Saturday, June 30, 2018

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(); 
Dynamic Multiple GroupBy Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team