tags:

views:

15

answers:

1

How do I populate the List(of Customers) in vb.net. I have the CustomersDataContext and I want to populate the customers.

Please help

Dim _db As New CustomersDataContext
        Dim _cust As New Customer
        Dim customers As List(Of customer) = Nothing
A: 
Dim _db As New CustomersDataContext
Dim customers As List(Of customer) = _db.Customers.ToList()

Ps. do u really want to pull All customers? analyze the situation carefully, as you might be putting unnecessary load to your whole system.

eglasius
Thanks Freddy. I changed the table name the table I am using will have a max of 2 records. Thanks again
acadia