title: How do I Iterate Linq group result set?
body: <p>I'm getting some data from my database and using linq to calculate sums and counts and group the data.
  This is what I have:</p>
  
  <pre><code>        var si = _repository.GetAllByDate(date);
  
          var cs = from s in si
          group s by s.Name into g
          select new { Comm = g.Key, SIList = g.ToList(), Count = g.Count() };
  </code></pre>
  
  <p>i now need to pass cs to a method in another class so that I can extract Comm, SIList and Count for each item in the group, what type do I pass it as? IEnumerable doesn't work. The actual linq group result type seems to be:</p>
  
  <p><code>{System.Linq.Enumerable.WhereSelectEnumerableIterator&lt;System.Linq.IGrouping&lt;Model.Domain.MasterData
  .MyItem,Model.Domain.SI&lt;&gt;f__AnonymousTyped&lt;Model.Domain.MasterData.MyItem,System.Collections.Generic.List&lt;Model.Domain.SI&gt;,int&gt;&gt;}</code></p>
  
  <p>Any ideas? I effectively want to pass cs as a variable and iterate through it there.</p>