How to: Eliminate Duplicate Elements from a Sequence (LINQ to SQL)
Use the Distinct operator to eliminate duplicate elements from a sequence.
The following example uses Distinct to select a sequence of the unique cities that have customers.
IQueryable<String> cityQuery =
(from cust in db.Customers
foreach (String cityString in cityQuery)
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback