ÞÄTRÏÇK ÞÄTRÏÇK - 5 months ago 87
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();