Naor Naor - 24 days ago 6
C# Question

Group by with multiple columns using lambda

How can I group by with multiple columns using lambda?

I saw examples of how to do it using linq to entities, but I am looking for lambda form.

Answer
var query = source.GroupBy(x => new { x.Column1, x.Column2 });