title: Linq Error: InvalidOperationException: Could not translate expression
body: <p>Get value out of DateTime column
  if null to return String.Empty
  else
  DateTime.ToShortDateString</p>
  
  <p>What am I doing wrong => query produced below:</p>
  
  <pre><code>var queryable = from p in Products
      select new {
                 selldate = p.SellEndDate == null
                             ? string.Empty
                             : p.SellEndDate.Value.ToShortDateString()  };
  </code></pre>
  
  <p>Error: InvalidOperationException: Could not translate expression 'Table(Product).Select(p => new &lt;>f__AnonymousType0<code>1(selldate = IIF((p.SellEndDate = null), Invoke(value(System.Func</code>1[System.String])), p.SellEndDate.Value.ToShortDateString())))' into SQL and could not treat it as a local expression.</p>