title: Table doesnt automatically populate items when selected
body: <p>I have two tables; ItemType and Item. Item has a property named ItemTypeId which holds a value from ItemType Id. Very basic. </p>
  
  <p><strong>ItemType</strong></p>
  
  <pre><code>public class ItemType
  {
      public int Id { get; set; }
      public string Name { get; set; }
  
      public virtual ICollection&lt;Item&gt; Items { get; set; } = new HashSet&lt;Item&gt;();
  
      public enum ListTypes
      {
          Student = 1,
          Work = 2,
          Gamer = 3,
          Other = 4
      }
  }
  </code></pre>
  
  <p><strong>Item</strong></p>
  
  <pre><code>public class Item
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public string Graphic { get; set; }
      public decimal Price { get; set; }
      public string Description { get; set; }
      public int ItemTypeId { get; set; }
      public virtual ItemType ItemType { get; set; }
  }
  </code></pre>
  
  <p><strong>DbContext</strong></p>
  
  <pre><code>public class TechDbContext : DbContext
  {
      public TechDbContext(DbContextOptions&lt;TechDbContext&gt; options) : base(options)
      {
  
      }
  
      public DbSet&lt;ItemType&gt; ItemTypes { get; set; }
      public DbSet&lt;Item&gt; Items { get; set; }
  
      protected override void OnModelCreating(ModelBuilder modelBuilder)
      {
          modelBuilder.Entity&lt;ItemType&gt;().ToTable("ItemType");
          modelBuilder.Entity&lt;Item&gt;().ToTable("Item");
      }
  }
  </code></pre>
  
  <p>and finally the view component that selects the ItemType object</p>
  
  <pre><code>public class ItemListViewComponent : ViewComponent
  {
      private Data.TechDbContext _context;
  
      public ItemListViewComponent(Data.TechDbContext context)
      {
          _context = context;
      }
  
      public async Task&lt;IViewComponentResult&gt; InvokeAsync(Models.ItemType.ListTypes type)
      {
          var single = await (from t in _context.ItemTypes where t.Id == (int)type select t).FirstAsync&lt;Models.ItemType&gt;();
  
          return View(single);
      }
  }
  </code></pre>
  
  <p>Maybe I've misunderstood, but I thought when I used the correct naming convention the Items property would automatically be populated without any extra code?</p>
  
  <p>Many thanks in advance!</p>