Grouping Results in LINQ

added by DotNetKicks
2/21/2017 5:09:15 PM

1 Kicks, 312 Views

Practical .NET Complex queries can be solved with a combination of simpler LINQ queries, anonymous objects and the Group/By/Into clauses. Using Group/By/Into will also give you the best possible performance for those complex queries. Let's take an interesting problem: Your users want to find the 10 customers who have bought the most from you.