title: Execution of non-generic DbContext.Set?
body: <p>I need to execute a dynamic set type, here's what I'm trying to do (pseudo):</p>
  
  <pre><code>var type = GetSetType(); //System.Type
  var set = context.Set(type);
  var results = set.ToArray();
  </code></pre>
  
  <p>I know this can't work for sure, <code>Enumerable</code> ex. methods are only for generic <code>IEnumerable</code>s, but I tried <code>set.AsQueryable().Cast&lt;object&gt;().ToArray()</code>, and a <code>NotSupportedException</code> was thrown: <em>"LINQ to Entities only supports casting EDM primitive or enumeration types."</em>.</p>
  
  <p>Any way to execute a non-generic <code>DbSet</code>?</p>