title: groupby to multiple fields in LINQ Currently - i have linq something like this
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/13636446/linq-groupby-add-fields-in-select-query">linq + groupby - add fields in select query</a>  </p>
  </blockquote>
  
  
  
  <p>I  wanted to group by with multiple fields something like q = q.GroupBy(c => c.Id, c.name,c.age,c.dob)</p>
  
  <p>also how to put them in select query ?? such that i will get the newly added fields in select query also.</p>
  
  <pre><code>q = q.GroupBy(c =&gt; c.Id)
                         .Select(g =&gt; new View
                         {
                             Id = g.Key,
                             ENAME= string.Join(",", g.Select(x =&gt; x.CaseApprover).ToList())
                         });
  </code></pre>