Let say I have Customers table in a database. I’d like to create List of CustomerNames using entity framework 4.1. How can I do that in Visual Basic?
Dim customerNames = (From c In _context.Customers
Select New With {c.CustomerName}).ToList()
brings a list of anonymous objects.
If you just want a
List<String>with the customer names, then select theCustomerNamewithout creating anonymous objects: