Dynamic Multiple GroupBy
Is it possible to use Expression Tree to build a group by and select like this?
var results= persons.GroupBy(n => new { n.PersonId, n.car}) .Select(g => new {label = g.Key.PersonId + g.Key.car, total = Sql.Count("*"))}).ToList();
0 comments:
Post a Comment