ÞÄTRÏÇK ÞÄTRÏÇK - 1 year ago 233
C# Question

Entity Framework select distinct name

How can I do this SQL query with Entity Framework?

SELECT DISTINCT NAME FROM TestAddresses

Answer Source

Using lambda expression..

 var result = EFContext.TestAddresses.Select(m => m.Name).Distinct();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download