Group by and Having > 1 using LINQ and C#

How can I use Group By, Having > 1 using LINQ and C#?

Date: Thursday, September 7, 2023
1 answers | 201 view(s)
by Mauricio Junior


It's necessary to do like that: But first, you need to decide to group by something, in my case, I will like to group by Url

_youRepositoryClass .GroupBy(i => i.Url) .Where(grp => grp.Count() > 1) .Select(grp => grp.Key) .ToList();

Thursday, September 7, 2023

Mauricio Junior

Learn database step by step in practice