title: Cast IQueryable<EntityObject> to IQueryable<Specific>
body: <p>We are trying to cast an instance of <code>IQueryable&lt;EntityObject&gt;</code> to an <code>IQueryable&lt;SpecificEntityObject&gt;</code>, the <code>SpecificEntityObject</code> type is only known at runtime.</p>
  
  <p>We have tried using the code below, which does not compile because The type or namespace 'objType' does not exist.</p>
  
  <pre><code>var t = query.ElementType;
  Type objType = typeof(IQueryable&lt;&gt;).MakeGenericType(t);
  var typed = query.Cast&lt;IEnumerable&lt;objType&gt;&gt;();
  
  
  var grouped = typed.GroupByMany(groupBy.Select(grp =&gt; grp.Expression).ToArray());
  </code></pre>
  
  <p>Any ideas?</p>