title: What is the equivalent of "CASE WHEN THEN" (T-SQL) with Entity Framework?
body: <p>I have a Transact-SQl request that I use a lot and I want to get the equivalent with Entity Framework. But I don't know how to make a "CASE WHEN" statement with EF. Here is a simplified code of my request :</p>
  
  <pre><code>SELECT Code,
  SUM(CASE WHEN Month=1 THEN Days Else 0 END) AS Jan,
  FROM MyTable 
  GROUP BY Code
  </code></pre>
  
  <p>Can you tell me if it's possible and how to do this with EF ?</p>