title: C# Dynamic Query Without A Database Model
body: <p>I have been searching the web for a solution to dynamic queries.</p>
  
  <p>I have found many different solutions (e.g. Linq to Sql, Dynamic Linq Expressions, Dynamic Query), but all of these solutions involve some sort of previous knowledge of the database (like a model in code).  Maybe what I am asking is way off the deep end, but is there any possible way to dynamically query a database without a model?</p>
  
  <p>For example, a database has a <code>Customers</code> table with the following columns:</p>
  
  <ul>
  <li>CustomerID</li>
  <li>Name</li>
  <li>FavoriteColor</li>
  </ul>
  
  <p>I want to create a query as <code>SELECT Name FROM Customers WHERE @0 = @1</code>, where the two placeholders are populated dynamically.  The resulting data does not tie to a model class and I would prefer to use some sort of framework to build the queries, not simple string concatenation.</p>
  
  <p>The System.Linq.Dynamic namespace came really close to fulfilling this request, but it uses a database model.</p>
  
  <p>I realize this is crazy, but I was just curious.</p>