How can I group by multiple columns using linq projection?
Something like this:
var q = db.Areas.GroupBy(x => x.AreaCatId, x.AreaCatName, x.AreaId, x.AreaName);
Resulting in a flat result set such as:
AreaCatId, AreaCatName, AreaId, AreaName
0 US 1 FL
0 US 2 NY
1 Canada 3 BC
You can GroupBy an anonymous type: