Naor Naor - 1 year ago 75
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 Source
var query = source.GroupBy(x => new { x.Column1, x.Column2 });