Reputation: 749
How can i select data from DB using LINQ and distinct results by two columns?
SQL:
SELECT distinct date, SSN
FROM tablename
Upvotes: 1
Views: 1050
Reputation: 2185
var query = (from t in tableName
select new { t.date, t.SSN }).Distinct();
Upvotes: 4