Home
Options

Aggregate

I want to find the item that occurs the most times in a table. So far I have:

UserSites.GroupBy(s => s.UserID).Aggregate((i1,i2) => i1.Count() > i2.Count() ? i1 : i2)

But I get an error - NotSupportedException: The query operator 'Aggregate' is not supported.

Is there a work-around or someway of getting the Aggregate operator?

Comments

Sign In or Register to comment.