title: I can't pull subcategories
body: <pre><code>    Entity;
      public class Category
      {
          [Key]
          [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
          public int categoryID { get; set; }
          public string Name { get; set; }
          public string Description { get; set; }
      }
  
   public class SubCategory
      {
          [Key]
          [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
          public int subCategoryID { get; set; }
          public string Name { get; set; }
          public string Description { get; set; }
          public int CategoryID{ get; set; }
      }
  
   Models ;
       public class CategoryModel
          {
              public List&lt;Entity.Category&gt; Categories { get; set; }
              public List&lt;SubCategory&gt; SubCategories { get; set; }
          }
  Controller ;
   public IActionResult Index()
          {
              var categories = _adminService.GetAllCategory();
             
  
              var subcategories = _adminService.GetAllSubCategories();
             
              var entity = new CategoryModel()
              {
                  Categories = categories,
                  SubCategories = subcategories
              };
        return View(entity);
  }
  
  
  View; 
             @{
                                  
                                      foreach (var category in Model.Categories)
                                      {   
  
                                          @Html.Hidden(&quot;catID&quot;,category.categoryID)
                                          &lt;a href=&quot;#&quot;&gt;@category.Name &lt;i class=&quot;fa fa-angle-right&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;/a&gt;
                                          &lt;ul class=&quot;sub-category&quot;&gt;
                                              @foreach (var subcategory in Model.SubCategories)
                                              {
                                                @if (subcategory.CategoryID == category.categoryID)
                                                  {
                                                      &lt;li&gt;&lt;a href=&quot;@subcategory.subCategoryID&quot;&gt;@subcategory.Name&lt;/a&gt;&lt;/li&gt;
                                                  }
  
                                              }
                                          &lt;/ul&gt;
                                      }
                                  }
  </code></pre>
  <ul>
  <li></li>
  </ul>
  <p>Can you explain how i can show the categories in the menu on the view side? I can shoot categories, but I have trouble shooting subcategories. I shared the database schemes above. I will show it as a drop down menu in the menu.I think there is a problem in the if part.</p>
  <p>*</p>