Group by in Linq to sql with an aggregate column
<p>I am having difficulty converting a simple T-SQL statement into a LINQ statement. </p>

<pre><code>select UserName,SUM(Value) FROM UserValues Group By username
</code></pre>

<p>I have got so far in C#:</p>

<pre><code>var TcountValues = _context.UserValues.GroupBy(g=&gt;g.UserName);
</code></pre>

<p>I am not sure If I am suppose to be using a select after this to get to my Username and aggregate function. At this point I am not even sure if I should be using the group by method in LINQ. </p>

<p>Any help will be appreciated.</p>