title: Expressions as parameter
body: <p>I'm using a expression as parameter for inserting data (with EF) :</p>
  
  <pre><code>public bool Exists(Expression&lt;Func&lt;V, bool&gt;&gt; predicate)
  {
      return _dbContext.Set&lt;V&gt;().Any(predicate);
  }
  
  public void AddIfNotExists(V entity, Expression&lt;Func&lt;V, bool&gt;&gt; predicate)
  {
      if (!Exists(predicate))
          Add(entity);
  }
  </code></pre>
  
  <p>I have a method nammed Synchronize with a different expression :</p>
  
  <pre><code>protected void Synchronize&lt;T&gt;(string resource, Expression&lt;Func&lt;T, T, bool&gt;&gt; predicate) where T : class
  {
      var list = _context.RestClient.Get&lt;List&lt;T&gt;&gt;(resource);
  
      using (var repo = new Repository&lt;GmaoContext, T&gt;())
      {
          list.ForEach(x =&gt;
          {
              repo.AddIfNotExists(x, y =&gt; predicate.Compile().Invoke(x, y));
          });
  
          repo.Save();
      }
  }
  </code></pre>
  
  <p>I need two parameters for my method Synchronize :</p>
  
  <pre><code>Synchronize&lt;ClientLivraison&gt;("clientlivraison", (x, y) =&gt; x.IdClientJuridique == y.IdClientJuridique &amp;&amp; x.IdClientLivraison == y.IdClientLivraison);
  </code></pre>
  
  <p>At runtime, I have this exception :</p>
  
  <p><em>System.NotSupportedException : 'LINQ to Entities does not recognize the method 'Boolean Invoke(Manuloc.Gmao.SynchroDb.Entity.Origine, Manuloc.Gmao.SynchroDb.Entity.Origine)' method, and this method cannot be translated into a store expression.'</em></p>
  
  <p>My question, how convert/pass my expression</p>
  
  <pre><code>Expression&lt;Func&lt;T, T, bool&gt;&gt;
  </code></pre>
  
  <p>To</p>
  
  <pre><code>Expression&lt;Func&lt;T, bool&gt;&gt;
  </code></pre>