title: "Operation is not valid due to the current state of the object." Exception, when I want to retrieve Items
body: <p>I use this method to retrieve Items for a Tree component in Blazor Serverside, In the DAL I have:</p>
  
  <pre><code>public List&lt;TreeItem&gt; GetTreeItems()
      {
          var tree = new List&lt;TreeItem&gt;();
          TreeItem item = new TreeItem()
          {
              DepartmentID = 0,
              CategoryID = 0,
              Text = "Root",
              Childs = context.Departments.OrderBy(d =&gt; d.Order).Select(d =&gt; new TreeItem()
              {
                  DepartmentID = d.Id,
                  CategoryID = 0,
                  Text = d.Title,
                  Childs = d.Categories.OrderBy(c =&gt; c.Order).Select(c =&gt; new TreeItem()
                  {
                      DepartmentID = d.Id,
                      CategoryID = c.Id,
                      Text = c.Title                         
                  }).ToList()
              }).ToList()
          };
          tree.Add(item);
  
          return tree;
      }
  </code></pre>
  
  <p>The TreeItem class is the following, (The model shared by the blazor Component and Dal Class):</p>
  
  <pre><code>public class TreeItem
  {
      public int DepartmentID { get; set; }
      public int CategoryID { get; set; }
      public string Text { get; set; }
      public List&lt;TreeItem&gt; Childs { get; set; }        
  }
  </code></pre>
  
  <p>But when I was to retrieve Items for the tree in the blazor component I get the exception: <strong>Operation is not valid due to the current state of the object.</strong>, admin is the DAL class I inject to Blazor component as follows:</p>
  
  <pre><code> private void GetTreeModel()
  {
      try
      {
          Items = admin.GetTreeItems();
          TreeSuccess = true;
          TreeMessage = "Success";
          return;
      }
      catch (Exception ex) // Error here
      {
          TreeSuccess = false;
          TreeMessage = "Can not load tree items";
          return;
      }
  }
  </code></pre>
  
  <p>What is this error and How to solve it?</p>