Austinn wrote:
currently I am doing this
var custColl1 = custColl.Select(o => o.CustomerNo.Value).Distinct();
What is custColl? Because seems like you are querying an EntityCollection in-memory.
If you are using LINQ2LLBL, then the code should look like this (assuming you are using Adapter templateset):
using (var adapter = new DataAccessAdapter())
{
var metaData = new LinqMedata(adapter);
var results = (from c in metaData.Customer
select c.CustomerNo).Distinct().ToList();
}
You also can use DynamicLists, just pass false to the _allowDuplicates _parameter in the _FetchTypedList _method.