在LinQ中填充(客户)列表

时间:2009-10-06 19:37:16

标签: linq-to-sql

如何在vb.net中填充List(of Customers)列表。我有Customers DataContext,我想填充客户。

请帮忙

Dim _db As New CustomersDataContext
        Dim _cust As New Customer
        Dim customers As List(Of customer) = Nothing

1 个答案:

答案 0 :(得分:0)

Dim _db As New CustomersDataContext
Dim customers As List(Of customer) = _db.Customers.ToList()

聚苯乙烯。你真的想吸引所有客户吗?仔细分析情况,因为您可能会给整个系统带来不必要的负担。