If you want to select particular columns, you can use projections in your query and shape your results by picking particular properties rather than entities. If the column you are returning is always different and you want to choose the column dynamically,
you can use projecting with query builder methods, something like :
Dim context AsNew NorthwindEntities
Dim colSel AsString = "CompanyName"'Column name you want to select. You can change the name to othersDim customQuery = context.Customers.Where("it.CustomerID = 'VINET'").Select("it." & colSel)
ForEach mm In customQuery
And I think you can also achieve what you want using Dynamic LINQ.
By the way, I am moving this thread to "ADO.NET Entity Framework and LINQ to Entities" forum for better response.
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact