title: Out of memory exception on bulk data load on list c#
body: <p>I have the below code to load bulk data on my list</p>
  
  <pre><code>List&lt;manager&gt; employeeList = new List&lt;manager&gt;();
  var employees = //fetching bulk data here
  foreach (var employee in employees)
  {
      List&lt;string&gt; managerlist = new List&lt;string&gt;();
      foreach (var manager in employee.EntityList.Where(x =&gt; x.Id == employee.Id))
      {
          managerlist.Add(manager);
      }
  
      employeeList.manager = managerlist;
  }
  </code></pre>
  
  <p>Im getting out of memory exception while processing this. This list contains around 5000 records in total. Anyone can suggest a workaround for this?</p>