title: From BinaryExpression to Expression<Func<T, bool>>
body: <p>Suppose I have something like</p>
  
  <pre><code>Expression&lt;Func&lt;SomeType, DateTime&gt;&gt; left = x =&gt; x.SomeDateProperty;
  Expression&lt;Func&lt;SomeType, DateTime&gt;&gt; right = x =&gt; dateTimeConstant;
  var binaryExpression = Expression.GreaterThan(left, right);
  Expression&lt;Func&lt;SomeType, bool&gt;&gt; predicate = 
                            x =&gt; x.SomeDateProperty&gt; dateTimeConstant;
  </code></pre>
  
  <p>1) How can I replace the right hand of the assignment of the last line with something that uses the <code>binaryExpression</code> instead? <code>var predicate = x =&gt; binaryExpression;</code> doesn't work.</p>
  
  <p>2) The <code>right</code> is always a constant, not necessarily DateTime.Now. Could it be of some simpler <code>Expression</code> type? For instance, it doesn't depend on SomeType, it is just a constant.</p>
  
  <p>3) If I have the <code>GreaterThan</code> as a <code>string</code>, is there a way to get from this string to the method with the same name in <code>Expression</code>? In general, if the name of the comparison method is given as a <code>string</code>, how can I go from the string to actually calling the method with the same name on the <code>Expression</code> class?</p>
  
  <p>It has to work with LINQ to Entities, if it matters.</p>