title: Conditional Sum in LINQ
body: <p>what is the linq query from this sql query</p>
  
  <pre><code>SELECT 
        sum(IIF(jenis = 'primer',1,0)) as sum_primer, 
        sum(IIF(jenis = 'sekunder',1,0)) as sum_sekunder
  FROM cooperations
  </code></pre>
  
  <p>Try to search same example from 101 Linq Samples, but got no clue</p>
  
  <p><strong>UPDATE</strong>
  So, I using this query in my C#</p>
  
  <pre><code>var query = (from c in db_cooperations.cooperations
                group c by c.jenis into g
                select
                (new
                {
                  sum_primer = g.Count(c =&gt; c.jenis == "primer"),
                  sum_sekunder = g.Count(c =&gt; c.jenis == "sekunder")
                })).ToArray();
  </code></pre>
  
  <p>The output are</p>
  
  <pre><code> sum_primer   sum_sekunder
      0             0 
      0             52
     250            0
      0             0
      0             0
  </code></pre>
  
  <p>So, how I could remove the zero value, and just return one row</p>