LINQ and order-by a date field
<p>I've a very simple LINQ query to select dates from a table column - and I want to order by the date values:</p>

<pre><code>var allDates = db.Table1.Select(m =&gt; m.Date).OrderBy(m =&gt; m.Date).Distinct();
</code></pre>

<p>But during runtime, I get the exception</p>

<pre><code>"The specified type member 'Date' is not supported in LINQ to Entities."
</code></pre>

<p>In the model and the database, date-field is of type "DateTime".
Selecting the values without ordering works fine.</p>