multiple column in group by clause in datatable
<p>I have a data table contains 3 column count,memory,cores. Now I am trying to get sum of count group by memory and cores. </p>

<p>I am using this code :</p>

<pre><code>var queryG = from row in dtFilterX.AsEnumerable()
                        group row by row.Field&lt;string&gt;("memory") into grp
                        select new
                        {
                            Id = grp.Key,
                            sum = grp.Sum(r =&gt; r.Field&lt;int&gt;("count"))
                        };
            foreach (var grp in queryG)
            {
                dtFilter.Rows.Add(grp.Id, grp.sum);
            } 
</code></pre>

<p>I am not able to add core column in group by condition as I am new to LINQ.
Please help me.</p>

<p>Thanks
Gulrej</p>
