title: Dynamic query using LINQ to SQL
body: <p>I need to figure out if it is possible to dynamically build a query with LINQ, dynamically selecting the table in which to perform the query.</p>
  
  <p>This is an example of what I would do:</p>
  
  <pre><code>//Not working,just for example
  
  public List&lt;dynamic&gt; _getGenericList(String tableName)
      {
          var l = from a in db.//I need to use here tableName
                    select a;
  
          return l.ToList&lt;dynamic&gt;();
      }
  </code></pre>
  
  <p>Is there a way to make this possible?</p>