title: How to do an aggregate query in LINQ
body: <p>I have a transactions table with an amount field and I want to split the amount field into Debit and Credit. What is the LINQ equivalent to the SQL query below?</p>
  <pre class="lang-sql prettyprint-override"><code>Select sum(Amount &lt; 0 ? Amount : 0) as Debit, sum(Amount &gt; 0 ? 0 : Amount) as Credit
  from transactions
  where Account = strAccount
  </code></pre>