title: Is there a function similar to Math.Max for Entity Framework?
body: <p>I have an entity framework query as follows;</p>
  
  <pre><code>From T In Db.MyTable
  Where (T.Col1 - T.Col2) + T.Col3 - T.Col4 &gt; 0 _
  Select T
  </code></pre>
  
  <p>I now need to make sure that the bracketed part '(T.Col1 - T.Col2)' does not go below zero.</p>
  
  <p>In .Net, I'd code it as follows (but obviously EF does not like Math.Max).</p>
  
  <pre><code>From T In Db.MyTable
  Where Math.Max(T.Col1 - T.Col2,0) + T.Col3 - T.Col4 &gt; 0 _
  Select T
  </code></pre>
  
  <p>Is there an easy way to do this? I am using EF 2.0 (not the latest, just released version).</p>
  
  <p>Thanks in advance</p>