title: How to get the results out to load the values in nested lists without using foreach loop?
body: <p>Am trying to understand if there is any better way to load the below results into nested lists without using a <code>foreach</code> loop?</p>
  
  <pre><code>class Lead
  {
      public int Empid { get; set; }
      public int EmpName { get; set; }
      public int EmpCategory { get; set; }
      List&lt;Lead&gt; TeamMembers { get; set; }
  }
  </code></pre>
  
  <p>I have a collection like the one below. The least sequence will always be Team lead and the same number in EmpCategory field will be team members. How to load the Team lead and team members as defined in the above structure. </p>
  
  <pre><code>   EmpID  EmpName  EmpCategory  Sequence
      1        A         12          1
      2        B         14          2
      3        C         15          3
      4        D         16          4
      5        E         12          5
      6        F         12          6
      7        G         12          7
  </code></pre>