title: Unable to combine two linq results in one var
body: <p>I have two linq results and I want to combine them in one var. How can I achieve this?</p>
  
  <pre><code> var xAxisconceptIdsAndName = _analysisResult.Select(x =&gt; new { x.ConceptId1, x.ConceptDisplay1 }).Distinct();
   var yAxisconceptIdsAndName = _analysisResult.Select(x =&gt; new { x.ConceptId2, x.ConceptDisplay2 }).Distinct();
  </code></pre>
  
  <p>xAxisconceptIdsAndName returns (1,"a") and yAxisconceptIdsAndName returns (2,"b"). I want them in one result like (1,"a"),(2,"b"), etc.</p>
  
  <p>Results:</p>
  
  <p>Approach - 1:</p>
  
  <pre><code>var conceptIdsAndName = Enumerable.Union(xAxisconceptIdsAndName, yAxisconceptIdsAndName);
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code> The type arguments for method 'System.Linq.Enumerable.Union&lt;TSource&gt;(System.Collections.Generic.IEnumerable&lt;TSource&gt;, System.Collections.Generic.IEnumerable&lt;TSource&gt;)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
  </code></pre>
  
  <p>Approach - 2:</p>
  
  <pre><code>var conceptIdsAndName = xAxisconceptIdsAndName.Union(yAxisconceptIdsAndName);
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code> 'System.Collections.Generic.IEnumerable&lt;AnonymousType#1&gt;' does not contain a definition for 'Union' and the best extension method overload 'System.Linq.Queryable.Union&lt;TSource&gt;(System.Linq.IQueryable&lt;TSource&gt;, System.Collections.Generic.IEnumerable&lt;TSource&gt;)' has some invalid arguments
  
   Instance argument: cannot convert from 'System.Collections.Generic.IEnumerable&lt;AnonymousType#1&gt;' to 'System.Linq.IQueryable&lt;AnonymousType#2&gt;'
  </code></pre>
  
  <p>Any suggestions?</p>