title: How to set the context of a Dynamic Expression
body: <p>I am trying to build dynamic expression which I don't know its structure at compile time but I know how to parse it</p>
  
  <pre><code>var x = Expression.Parameter(typeof(T), "x");    
  var lambda = DynamicExpressionParser.ParseLambda(new[] { x }, typeof(bool), expression);
  </code></pre>
  
  <p>Where <code>expression</code> is a runtime string that can be for example</p>
  
  <pre><code>x.Id &gt; 1
  </code></pre>
  
  <p>Now I have a more complex task I want to achieve</p>
  
  <pre><code>x =&gt; ListOfIds.Contains(x.Id)
  </code></pre>
  
  <p>I want to bind a value to the <code>ListOfIds</code> which I don't know how or where it will be available in the expression since it's dynamic and the function will only accept one argument (basically I want to feed the expression to a Linq where method).</p>