title: Does not get exception when collection is empty with Sum method and Nhibernate
body: <p>I have a <code>IQueryable</code> with NHibernate and I would like to have an linq query to sum an specific column, but, when my condition on <code>Where</code> method give me an empty result I do not want to get an exception, but I would not like to hit an query to get all records and after it sum on memory, I would like something like <code>coalese</code> sql command, for sample:</p>
  
  <pre><code>// I get exception when its empty
  var query = MyQueryable()
                .Where(x =&gt; x.IsDone)
                .Select(x =&gt; x.Value)
                .Sum(); 
  </code></pre>
  
  <p>I have to do something like this:</p>
  
  <pre><code>// I get 0, its ok, but ToList(), list all records on memory, 
  // I just want to get a single value
  
  var query = MyQueryable()
                 .Where(x =&gt; x.IsDone)
                 .Select(x =&gt; x.Value)
                 .ToList()
                 .Sum(); 
  </code></pre>
  
  <p>Is there any way?</p>
  
  <p>Thank you.</p>