title: How to use a sql function (coalesce or isnull) in Simple.Data
body: <p>I am porting a sql query to Simple.Data, the original query is something like:</p>
  
  <pre><code>select a.Field1, a.Field2, b.Field1
  from TableA a
  join TableB b ON a.KeyField = b.KeyField
  where coalesce(b.SomeDate, '1/1/1900') &lt;= getdate()
  </code></pre>
  
  <p>I've been able to port everything in the query except for that darn coalesce logic:</p>
  
  <pre><code>var currentDate = DateTime.Now;
  var result = db.TableA.Query()
      .Join(db.TableB).On(db.TableA.KeyField == db.TableB.KeyField &amp;&amp;
          db.TableB.SomeDate == currentDate)
      .Select(db.TableA.Field1, db.TableA.Field2, db.TableB.Field1);
  </code></pre>
  
  <p>Any thoughts on how to get the coalesce behavior in there?  I've tried using the <code>??</code> operator to no avail.</p>
  
  <p>Thanks in advance!</p>