4
Answers

Nested GroupBy extension method

Rich

Rich

12y
3.1k
1
Can someone show me a a simple example of a nested GroupBy extension method.  I am trying to group an object into a list. I figure it will look something like this:

List<stats> myStats = GetStatsList().GroupBy( d => d.date).GroupBy(t => t.team)
        Select(s => new stats
  {
        Date = 
        Team = 
 }).AsEnumerable().ToList();

Thanks in advance.

Answers (4)