How do I use Linq Sum After grouping by
<p>I have a list of records i.e.</p>

<pre><code>Id, Activity, Marks
1, A, 12
1, B, 14
1, B, 15
2, A, 1
2,A,100
</code></pre>

<p>I want to group the records by Id and Activity and then return the sum of the records.</p>

<p>How do I achieve that using LINQ? E.g. result should be:</p>

<pre><code>Id, Activity, TotalMarks
1, A, 12
1, B, 29
2, A, 101
</code></pre>
