title: joining the items in a list over foreach loop
body: <p>i want to join list with the same list over a foreach loop and finally generate complete list. i have tried using like this by  x = x.Concat(x); and x = x.AddRange(x); but havent worked it out. 
  Please tell me where i am doing wrong or is there any easier way to do this</p>
  
  <pre><code>try
              {
                  var dc = new OnyxDBEntities();
                  int list2 = 0;
                  int list3 = 0;
                  var count = dc.Users.Select(i =&gt; i.Id);
                  //var y = (from users in dc.Users where users.Id == 2 
                   select new { username = users.UserName, 
                  fullname = users.FirstName + " " + users.LastName, 
                  userid = users.Id, beadsetsa =  users.BeadSets, 
                  designaa = users.Designs }).ToList(); 
                  var y = (from users in dc.Users select 
                  new { username = users.UserName,
                  fullname = users.FirstName + " " + users.LastName,
                  userid = users.Id, beadsetsa = list2, designaa = list3 }).ToList(); 
                  var x = y;
                  foreach (var i in count)
                  {
                       list2 = (from users in dc.BeadSets 
                       where users.UserId == i select users).Count();
                       list3 = (from users in dc.Designs 
                       where users.UserId == i select users).Count();
                       x = (from users in dc.Users
                           where users.Id == i select 
                       new { username = users.UserName,
                       fullname = users.FirstName + " " + users.LastName,
                       userid = users.Id, beadsetsa = list2, designaa = list3 }).ToList();
                       x = x.Concat(x);
  
  
                  }
  
                  CreateExcelFile.CreateExcelDocument(x, "C:\\Customers1.xlsx");
              }
              catch (Exception ex)
              {
              }
  </code></pre>
  
  <p>I am getting this error</p>
  
  <pre><code>Cannot implicitly convert type 'System.Collections.Generic.IEnumerable&lt;AnonymousType#1&gt;' to 'System.Collections.Generic.List&lt;AnonymousType#1&gt;'
  </code></pre>