title: Passing an expression tree as a parameter to another expression tree
body: <p>I have two expression trees defined like this:</p>
  
  <pre><code>private Expression&lt;Func&lt;TEntity, TPropertyResult&gt;&gt; PropertyAccessor { get; set; }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>private Expression&lt;Func&lt;TPropertyResult, bool&gt;&gt; TestExpression { get; set; }
  </code></pre>
  
  <p>I need to create a new expression tree that will result in the equivalent of:</p>
  
  <pre><code>var expression = p =&gt; this.TestExpression(this.PropertyAccessor(p));
  </code></pre>
  
  <p>When using <code>Expression.Invoke(this.TestExpression, this.PropertyAccessor)</code>, I get the following error</p>
  
  <blockquote>
    <p>{"Expression of type
    'System.Func`2[MyEntity,System.String]'
    cannot be used for parameter of type
    'System.String'"}</p>
  </blockquote>
  
  <p><code>TPropertyResult</code> is a string during my test.</p>
  
  <p>I tried using <code>Expression.Call</code> or <code>Expression.Invoke</code>. No luck. What should I use?</p>