title: Custom LINQ-style implementation
body: <p>I am looking to implement a very simple method to allow for use of the LINQ-style syntax. Example:</p>
  
  <pre><code>var res = ctx.Users.Where(x=&gt;x.Name == "test" &amp;&amp; x.Id &gt; 1); 
  </code></pre>
  
  <p>The <code>Where()</code> method is what I am trying to implement. </p>
  
  <p>The overall idea is to have this <code>Where()</code> method perform a data source specific query to quickly fetch a subset of the data using a potentially-available index. Any subsequent method chained on will execute against the IEnumerable in-memory using LINQ-to-Objects.</p>
  
  <p>I can get this to work using the following implementation:</p>
  
  <pre><code>public IEnumerable&lt;T&gt; Where(Expression&lt;Func&lt;T, bool&gt;&gt; predicate)
  {
      //work with predicate body and return result of query
      return new List&lt;T&gt;();
  }
  </code></pre>
  
  <p>The only issue I noticed is that performance is a little slow when building out the LINQ Expression object. This is significant as I am working with a very fast local (non-SQL) store. Is there any way to just grab the raw input as a string (or some other format) so that I can use custom parsing logic? I am aware that I could just make this a string parameter, but I do really like the type checking I get with the LINQ lambda syntax.</p>