title: How to perform group by in LINQ and get a Iqueryable or a Custom Class Object?
body: <p>Here is my query - </p>
  
  <pre><code>var data = Goaldata.GroupBy(c =&gt; c.GoalId).ToList();
  </code></pre>
  
  <p>This returns a Igrouping object and I want an Iqueryable object which I can directly query to get the data while in this case I have to loop through using a foreach() and then get the data. Is there another way to group by in LINQ which returns directly as a list of Iqueryable or a List as similar to what happens for order by in LINQ.</p>