title: group by and sum using linq
body: <pre><code>Id | Value
  
  1    50
  2    60
  3    80
  3    50
  2    20
  1    60
  1   100
  </code></pre>
  
  <p>I would like to calculate using linq query the total for every id. I know I have to use the <code>group by</code> statement as same in sql: </p>
  
  <pre><code>select id, sum(Value)
  from MyTable
  group by id
  </code></pre>
  
  <p>but how can I achieve this using linq or lambda?</p>