Person
Name City
Joe Houston
Jerry London
Alex Houston
Jerry London
How to return duplicate row using LINQ like
Sql
SELECT name, city, count(*)
FROM collection
GROUP BY name,city
HAVING count(*) > 1
I tried something
var qry =
from m in context.Collections
group m by new { m.city, m.name } into grp
select new { rp = grp.Count() > 2 };