title: How to combine two C# Expressions using API?
body: <p>Say I have two classes like the following:</p>
  <pre class="lang-cs prettyprint-override"><code>public class A
  {
    public B B { get; set; }
  }
  public class B
  {
    public string SomeValue { get; set; } 
  }
  </code></pre>
  <p>And the following expressions:</p>
  <pre class="lang-cs prettyprint-override"><code>using System.Linq.Expressions;
  // Actual expression much more complicated
  Expression&lt;Func&lt;B, string&gt;&gt; mainExpression = b =&gt; b.SomeValue; 
  Expression&lt;Func&lt;A, B&gt;&gt; aToB = a =&gt; a.B;
  </code></pre>
  <p>How would I combine them? Obviously I could write</p>
  <pre class="lang-cs prettyprint-override"><code>Expression&lt;Func&lt;A, string&gt;&gt; newExpression = a =&gt; a.B.SomeValue;
  </code></pre>
  <p>But the real &quot;<code>mainExpression</code>&quot; is much more complicated and I'd like to avoid code duplication.</p>
  <p>I'm using EntityFramework, these are classes representing database tables, which is why I need a <code>System.Linq.Expressions.Expression</code> object.</p>