title: Linq 2 SQL Sum using lambda and handling nulls
body: <p>When using sum with lambda in Linq to SQL using the following code: </p>
  
  <pre><code>int query = (from f in odc.RDetails
                       where f.ticketID == int.Parse(ticket.ToString())
                       select f).Sum(x =&gt; x.Rate);
  </code></pre>
  
  <p><br><br>
  I get the following error:<br><br>
  <b>
  The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type.</b></p>