ÞÄTRÏÇK ÞÄTRÏÇK - 1 month ago 23
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();
Comments