title: Compare date part in where clause
body: <p>When tried to condition the where statement to only compare the date part of the datetime field using this code, </p>
  
  <pre><code>var list =  products.Where(x =&gt; ((DateTime)x.PurchaseDate).Date &gt;= dt_SelectDate.Value.Date);
  </code></pre>
  
  <p>I used the <code>(DateTime)</code> conversion because EF don't recognize the <code>.GetValueOrDefault()</code>, and the <code>PurchaseDate</code> field is nullable.</p>
  
  <p>the error I got is </p>
  
  <blockquote>
    <p>The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.</p>
  </blockquote>