title: Dynamic where clause in LINQ - with column names available at runtime
body: <p>Disclaimer: I've solved the problem using Expressions from System.Linq.Expressions, but I'm still looking for a better/easier way.</p>
  
  <p>Consider the following situation :</p>
  
  <pre><code>var query = 
      from c in db.Customers
      where (c.ContactFirstName.Contains("BlackListed") || 
             c.ContactLastName.Contains("BlackListed")  ||
             c.Address.Contains("BlackListed"))
      select c;
  </code></pre>
  
  <p>The columns/attributes that need to be checked against the blacklisted term are only available to me at runtime. How do I generate this dynamic where clause?</p>
  
  <p>An additional complication is that the Queryable collection (db.Customers above) is typed to a Queryable of the base class of 'Customer' (say 'Person'), and therefore writing c.Address as above is not an option.</p>