Risposte:
Come questo:
from c in db.Company
group c by c.Name into grp
where grp.Count() > 1
select grp.Key
Oppure, usando la sintassi del metodo:
Company
.GroupBy(c => c.Name)
.Where(grp => grp.Count() > 1)
.Select(grp => grp.Key);
Per chiunque cerchi di farlo in vb (com'ero e non riuscivo a trovare nulla)
From c In db.Company
Select c.Name Group By Name Into Group
Where Group.Count > 1
Group By
sia la Select
clausola after in VB.
Di seguito la soluzione può aiutarti.
var unmanagedDownloadcountwithfilter = from count in unmanagedDownloadCount.Where(d =>d.downloaddate >= startDate && d.downloaddate <= endDate)
group count by count.unmanagedassetregistryid into grouped
where grouped.Count() > request.Download
select new
{
UnmanagedAssetRegistryID = grouped.Key,
Count = grouped.Count()
};