ÞÄTRÏÇK ÞÄTRÏÇK - 6 months ago 95
C# Question

Entity Framework select distinct name

How can I do this SQL query with Entity Framework?

SELECT DISTINCT NAME FROM TestAddresses

Answer

Using lambda expression..

 var result = EFContext.TestAddresses.Select(m => m.Name).Distinct();