title: Cannot convert lambda expression to type 'System.Linq.Expressions.Expression' because it is not a delegate type
body: <p>I am trying to create this lambda <code>(x =&gt; x.MenuItemId)</code> but I am not sure how to do that.</p>
  
  <pre><code>var item = Expression.Parameter(typeof(MenuItem), "x");
  var prop = Expression.Property(item, "MenuItemId");
  var lambda = Expression.Lambda&lt;Func&lt;MenuItem, object&gt;&gt;(x =&gt; x.MenuItemId);
  </code></pre>