Dynamic Linq "Where statement" with Relation
<p>I'm trying to build a query using Dynamic Linq and a where string statement calculated by myself. For example:</p>

<pre><code>List&lt;Publication&gt; results = new List&lt;Publication&gt;();

// Just an example, previously calculated dynamically
string filterQuery = "(Id = 1 and Number = 2)";

IQueryable&lt;Publication&gt; query = db.Publications.Include(i =&gt; i.Product);
query = query.Where(filterQuery);

results = query.OrderBy(orderQuery).ToList();
</code></pre>

<p>This is working great and I get a List of Publications with Products. Now... the question is. How can I make a string statement to get results based on a relation to Product using Dynamic Linq and a string statement?</p>

<p>Something like:</p>

<pre><code>string filterQuery = "(Id = 1 and Number = 2 and Products.Id = 1)"
</code></pre>