title: How to transform OData filter to a LINQ expression?
body: <p>I'm trying to extract the filter expression from <code>ODataQueryOptions</code> so that I can use it in my business logic class.</p>
  
  <pre class="lang-cs prettyprint-override"><code>public PageResult&lt;Poco&gt; Get(ODataQueryOptions odataQueryOptions)
  {
      Expression&lt;Func&lt;Poco, bool&gt;&gt; myExpression = ... // what do i do here?
  
      var result = _myBusinessLogic.Search(myExpression);
      return new PageResult&lt;Poco&gt;(result, null, null);
  }
  </code></pre>
  
  <p>I took a look at the blog describing translating the query into HQL <a href="http://blogs.msdn.com/b/webdev/archive/2013/02/25/translating-odata-queries-to-hql.aspx" rel="nofollow">here</a> and I think (at least I hope) that's an overkill for what I'm trying to do.</p>
  
  <p>I basically need to get the filter expression in the <code>Expression&lt;Func&lt;Poco, bool&gt;&gt;</code> form. I tried playing with <code>ApplyTo()</code> but I can't quite get it. Any help appreciated.</p>