title: Expression of type 'System.DateTime' cannot be used for return type 'System.Object'
body: <p>I've created an expression that I'm using for sorting which works fine, until I hit a <code>DateTime</code> field, where I get the following error (on the second line):</p>
  
  <blockquote>
    <p>Expression of type 'System.DateTime' cannot be used for return type
    'System.Object'</p>
  </blockquote>
  
  <p>Here's my code:</p>
  
  <pre><code>ParameterExpression param = Expression.Parameter(typeof(MyEntity), "x");
  
  Expression&lt;Func&lt;MyEntity, object&gt;&gt; sortExpression =
      Expression.Lambda&lt;Func&lt;AMyEntity, object&gt;&gt;(
          Expression.Property(param, sortKey), param);
  </code></pre>
  
  <p>Can anyone help at all?</p>