title: How to convert a LambdaExpression to typed Expression<Func<T, T>>
body: <p>I'm dynamically building linq queries for nHibernate.</p>
  
  <p>Due to dependencies, I wanted to cast/retrieve the typed expression at a later time, but I have been unsuccessfull so far.</p>
  
  <p>This is not working (the cast is supposed to happen elsewhere):</p>
  
  <pre><code>var funcType = typeof (Func&lt;,&gt;).MakeGenericType(entityType, typeof (bool));
  var typedExpression =  (Func&lt;T, bool&gt;)Expression.Lambda(funcType, itemPredicate, parameter); //Fails
  </code></pre>
  
  <p>This is working:</p>
  
  <pre><code>var typedExpression = Expression.Lambda&lt;Func&lt;T, bool&gt;&gt;(itemPredicate, parameter);
  </code></pre>
  
  <p>Is it possible to get the 'encapsulated' typed expression from a LambdaExpression?</p>