Rich

Rich

  • NA
  • 84
  • 61.3k

Nested GroupBy extension method

Mar 18 2012 9:19 PM
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)