title: Unable to concatenate two IEnumerable lists
body: <p>I am creating a <code>WEB API</code>. I have two <code>IEnumerable</code> lists. And at the end I want to concatenate them. </p>
  
  <pre><code>IEnumerable result;
  IEnumerable prodDetails = new List&lt;tj_xhqd&gt;();
  IEnumerable mainDetails= new List&lt;tj_xhqd&gt;();
  int prodInterval, prodCount = 0;
  int mainInterval, mainCount = 0;
  
  prodCount = giveProdCount(msn, dt);
  
  if(prodCount==0)
  {
      prodDetails = "";
  }
  else if (prodCount&lt;=500)
  {
      prodDetails =  mdcEntitites.tj_xhqd
          .Where( m =&gt; (m.zdjh == msn) &amp;&amp; (m.sjsj &gt;= dt) )
          .Select( x =&gt; new { MSN = x.zdjh, PingDateTime = x.sjsj, PingValue = x.xhqd } )
          .ToList();
  }
  else
  {
      prodInterval = prodCount / 500;
  
      prodDetails = mdcEntitites.tj_xhqd
          .AsNoTracking()
          .Where( m =&gt; (m.zdjh == msn) &amp;&amp; (m.sjsj &gt;= dt) )
          .AsEnumerable()
          .Select( (x, i) =&gt; new { MSN = x.zdjh, PingDateTime = x.sjsj, PingValue = x.xhqd, i = i } )
          .Where( x =&gt; x.i % prodInterval == 0 )
          .ToList();
  }
  
  mainCount = giveMainCount(msn, dt);
  
  if(mainCount==0)
  {
      mainDetails = "";
  }
  else if (mainCount &lt;=500)
  {
       mainDetails = kesc.tj_xhqd
          .Where(m =&gt; (m.zdjh == msn) &amp;&amp; (m.sjsj &gt;= dt))
          .Select(x =&gt; new { MSN = x.zdjh, PingDateTime = x.sjsj, PingValue = x.xhqd })
          .ToList();
  }
  else
  {
      mainInterval = mainCount / 500;
  
      mainDetails = kesc.tj_xhqd
          .AsNoTracking()
          .Where(m =&gt; (m.zdjh == msn) &amp;&amp; (m.sjsj &gt;= dt))
          .AsEnumerable()
          .Select((x, i) =&gt; new { MSN = x.zdjh, PingDateTime = x.sjsj, PingValue = x.xhqd, i = i })
          .Where(x =&gt; x.i % mainInterval == 0)
          .ToList();
  }
  
  if(prodDetails.ToString() == "")
  {
      result = mainDetails;
  }
  else if(mainDetails.ToString()=="")
  {
     result = prodDetails;
  }
  else
  {
      result = prodDetails.Concat( mainDetails ); // here I am getting error
  }
  </code></pre>
  
  <p>The error is </p>
  
  <pre><code>cannot convert from 'System.Collections.IEnumerable' to 'System.Collections.Generic.IEnumerable&lt;System.Collections.IEnumerable&gt;'
  </code></pre>
  
  <p>How can I get rid of this error? </p>
  
  <p>Any help would be highly appreciated. </p>