title: How do I compose existing Linq Expressions
body: <p>I want to compose the results of two Linq Expressions. They exist in the form</p>
  
  <pre><code>Expression&lt;Func&lt;T, bool&gt;&gt;
  </code></pre>
  
  <p>So the two that I want to compose are essentially delegates on a parameter (of type T) that both return a boolean. The result I would like composed would be the logical evaluation of the booleans. I would probably implement it as an extension method so my syntax would be something like:</p>
  
  <pre><code>Expression&lt;Func&lt;User, bool&gt;&gt; expression1 = t =&gt; t.Name == "steve";
  Expression&lt;Func&lt;User, bool&gt;&gt; expression2 = t =&gt; t.Age == 28;
  Expression&lt;Func&lt;User, bool&gt;&gt; composedExpression = expression1.And(expression2);
  </code></pre>
  
  <p>And later on in my code I want to evaluate the composed expression</p>
  
  <pre><code>var user = new User();
  bool evaluated = composedExpression.Compile().Invoke(user);
  </code></pre>
  
  <p>I have poked around with a few different ideas but I fear that it is more complex than I had hoped. How is this done?</p>