title: Can LINQ to SQL generate TSQL containing the ISNULL function?
body: <p>I was wondering whether anyone knows definitively if LINQ to SQL has the capability of generating TSQL code that contains the <code>ISNULL</code> function?</p>
  
  <p>I'm aware that using the coalesce operator (<code>??</code>) in a query:</p>
  
  <pre class="lang-cs prettyprint-override"><code>from o in Table
  where (o.Field ?? 0) &gt; 0
  select o
  </code></pre>
  
  <p>will cause LINQ to SQL to emit the <code>COALESCE</code> function:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT [t0].[Field]
  FROM [Table] AS [t0]
  WHERE (COALESCE([t0].[Field],0)) &gt; 0
  </code></pre>
  
  <p>And, that using the conditional operator (<code>?:</code>) in a query:</p>
  
  <pre class="lang-cs prettyprint-override"><code>from o in Table
  where (o.Field == null ? 0 : o.Field) &gt; 0
  select o
  </code></pre>
  
  <p>will result in TSQL containing a <code>CASE</code> statement:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT [t0].[Field]
  FROM [Table] AS [t0]
  WHERE (
      (CASE
          WHEN [t0].[Field] IS NULL THEN 0
          ELSE [t0].[Amount]
       END)) &gt; 0
  </code></pre>
  
  <p>But, can LINQ to SQL be coerced into generating TSQL code that contains <code>ISNULL</code> like the following?  </p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT [t0].[Field]
  FROM [Table] AS [t0]
  WHERE (ISNULL([t0].[Field],0)) &gt; 0
  </code></pre>
  
  <p>I'm betting the answer is "no, it can't," but I'd like to see something authoritative.</p>