title: How to add new item into IEnumerable<model> list without deleting the items
body: <pre><code>[HttpPost]
      public JsonResult AjaxMethod(string[] departments)
      {
          IEnumerable&lt;Batch&gt; batchList = Enumerable.Empty&lt;Batch&gt;();
          try
          {
              string a;
              for (int i = 0; i &lt; departments.Length; i++)
              {
                  a = departments[i];
                  batchList = batchList.Concat(obj.Batches.Where(x =&gt; x.Department_Id == a));
              }
              return Json(batchList);
          }
          catch
          {
              return Json(null);
          }
      }
  </code></pre>
  
  <p>I am sending AjaxMethod() an array with two indexes departments[0]="BSCS" and departments[1]="BSIT"<br><br>
  And i am using concat method to append IEnumerable list when when for loop runs the 2nd time, it overwrites the result of departments[0] and it concatinates departments[1] with departments[1]<br><br>
  I want this output:<br><br>
  bscs-f13<br>
  bscs-f14<br>
  bscs-f15<br>
  bsit-f13<br>
  bsit-f14<br>
  bsit-f15<br><br>
  But the actual output is:<br><br>
  bsit-f13<br>
  bsit-f14<br>
  bsit-f15<br>
  bsit-f13<br>
  bsit-f14<br>
  bsit-f15<br><br></p>