title: Concat Two IQueryables with Anonymous Types?
body: <p>I've been wrestling with this a little while and it's starting to look like it may not be possible.</p>
  
  <p>I want to <code>Concat()</code> two <code>IQueryable</code>s and then execute the result as a single query. I tried something like this:</p>
  
  <pre><code>var query = from x in ...
  select new
  {
      A = ...
      B = ...
      C = ...
  };
  
  var query2 = from y in ...
  select new
  {
      A = ...
      B = ...
      C = ...
  };
  
  var query3 = query.Concat(query2);
  </code></pre>
  
  <p>However, the last line gives me the following error:</p>
  
  <blockquote>
    <p>'System.Linq.IQueryable' does not contain a definition for 'Concat' and the best extension method overload 'System.Linq.ParallelEnumerable.Concat(System.Linq.ParallelQuery, System.Collections.Generic.IEnumerable)' has some invalid arguments</p>
  </blockquote>
  
  <p>It appears it's expecting an <code>IEnumerable</code> for the argument. Is there any way around this?</p>
  
  <p>It looks like I could resolve both queries to <code>IEnumerable</code>s and then <code>Concat()</code> them. But it would be more efficient to create a single query, and it seems like that should be possible.</p>