title: Convert string to linq query
body: <p>I was playing around with LINQPad and was curious how I could implement similar behavior in my own app, namely: how can I allow the user to input a LINQ query against a known database context as a string and then run that query in the application?</p>
  
  <p>For example, if I have the LINQ-to-SQL datacontext for the Northwind database in my application, I want the user to have the ability to type</p>
  
  <pre><code>from cust in Customers
  where cust.City == "London"
  select cust;
  </code></pre>
  
  <p>And I'll return the results of calling .ToList() on this query.</p>
  
  <p>Any ideas/tips/links?</p>
  
  <p>Thanks kindly</p>
  
  <p>Mustafa</p>