Rich

Rich

  • NA
  • 84
  • 40.6k

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)