title: How can I change already created Expression?
body: <p>I have kind of following class:</p>
  
  <pre><code>public class Entity
  {
      public int Id { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>I am passing <code>IEnumerable&lt;Entity&gt;&gt;</code> as data source to kendo grid (I think it does not matter, but added here for clearability of question).</p>
  
  <p>I want to implement server side filtering, and have implemented a separate <code>input[text]</code> field on the page, and adding filters on the client side in the following way:</p>
  
  <pre><code>var grid = $(e).data('kendoGrid');
  var columns = grid.columns;
  var columnTypes = grid.dataSource.options.schema.model.fields;
  for (var i = 0; i &lt; columns.length; i++) {
      if (columns[i].field) {
          var columnDataType = columnTypes[columns[i].field].type;
          if (columnDataType == 'number' &amp;&amp; !isNaN(Number(value))) {
              var filter = { field: columns[i].field, operator: "eq", value: Number(value) };
          } else if (columnDataType == 'string') {
              var filter = { field: columns[i].field, operator: "contains", value: value };
          }
  
          gridListFilter.filters.push(filter);
      }
  }
  
  var gridDataSource = grid.dataSource;
  console.log(gridListFilter);
  gridDataSource.filter(gridListFilter);
  </code></pre>
  
  <p>On the server side I have implement the following algorithm for filtering in virtualization handler method:</p>
  
  <pre><code>IQueryable&lt;Entity&gt; query = this.GetQuery&lt;Entity&gt;();
  foreach (var item in dataSourceRequest.Filters)
  {
      var paramExpr = Expression.Parameter(typeof(TReturnType), "item");
      var expr = item.CreateFilterExpression(paramExpr);
      var lambda = Expression.Lambda&lt;Func&lt;TReturnType, bool&gt;&gt;(expr, paramExpr);
      query = query.Where(lambda);
  }
  </code></pre>
  
  <p>where <code>dataSourceRequest</code> is of type <code>DataSourceRequest</code> from telerik library. Matters that <code>item.CreateFilterExpression</code> produces a <code>BinaryExpression</code> of the following representation:</p>
  
  <pre><code>item =&gt; (IIF((item != null), item.Id, 0) == 6999142) OrElse 
  ((IIF((item != null), item.Name, null) ?? "").ToLower().Contains("6999142".ToLower()))
  </code></pre>
  
  <p>Where "6999142" is search string which I have get from <code>input[text]</code> from view. And I want to modify this expression in the following manner:</p>
  
  <pre><code>item =&gt; (IIF((item != null), item.Id, 0).ToString().Contains("6999142")) OrElse 
  ((IIF((item != null), item.Name, null) ?? "").ToLower().Contains("6999142".ToLower()))
  </code></pre>
  
  <p>Is there a way to change already created <code>Expression</code> without re-creating the new one?</p>
  
  <p>If it is, can you provide the sample code for modifying, as I have no idea to what I should start from.</p>