title: Create predicate with a BinaryExpression containing multiple parameters
body: <p>is it possible to dynamically generate such a predicate using <code>LambdaExpressions</code>? </p>
  
  <pre><code>Expression&lt;Func&lt;Test, bool&gt;&gt; predicate = t =&gt;
      t.Levels.Any(l =&gt;
          l.LevelDetails.Any( ld =&gt;
              ld.LevelDate &gt; DbFunctions.AddDays(t.TestDate, 1)
          )
      );
  </code></pre>
  
  <p>As long as the parameters in the inner <code>BinaryExpression</code> are identical or the right part of the expression is constant, there is no problem. But the example expression<code>ld.LevelDate &gt; DbFunctions.AddDays (t.TestDate, 1)</code> contains two different <code>ExpressionParameters</code> which are independent from each other. What I am looking for is something like this:</p>
  
  <pre><code>Expression&lt;Func&lt;LevelDetail, DateTime?&gt;&gt; left = 
      ld =&gt; ld.LevelDate;
  Expression&lt;Func&lt;Test, DateTime?&gt;&gt; right = 
      t =&gt; DbFunctions.AddDays(t.TestDate, 1);
  
  BinaryExpression expr = 
      Expression.GreaterThan(
          ((LambdaExpression)left).Body,
          ((LambdaExpression)right).Body
      );
  Expression&lt;Func&lt;Test, bool&gt;&gt; predicate = t =&gt;
      t.Levels.Any(l =&gt;
          l.LevelDetails.Any( **expr** )
      );
  
  class Test {
      public DateTime TestDate { get; set; }
      public virtual ICollection&lt;Level&gt; Levels { get; set; }
  }
  class Level {
      public virtual ICollection&lt;LevelDetail&gt; LevelDetails { get; set; }
  }
  class LevelDetail {
      public DateTime LevelDate { get; set; }
  }
  </code></pre>
  
  <p>Kind regards!</p>