title: Include in a property with Generic Type in a sub property
body: <p>I need to make an include.
  I have the following classes</p>
  <pre><code>public class TestRoot
  {
      public int TestRootId { get; set; }
      public TestBase TestBase { get; set; }
  }
  
  public abstract class TestBase
  {
      public int TestId { get; set; }
      public string Name { get; set; }
      public User User { get; set; }
  }
  
  public class TestA : TestBase
  {
      public Item Item { get; set; }
  }
  
  public class TestB : TestBase
  {
      public Address Address { get; set; }
  }
  </code></pre>
  <p>How can I do this includes?
  I tried it in a few ways but it doesn't work.</p>
  <pre><code>context.TestRoot.Include(i =&gt; i.TestBase)
                  .Include(i =&gt; i.TestBase.User)
                  .Include(i =&gt; i.TestBase.Item)
                  .Include(i =&gt; i.TestBase.Address)
                  .FirstOrDefaultAsync(f =&gt; f.TestRootId == 1)
  
  context.TestRoot.Include(i =&gt; i.TestBase)
                  .Include(i =&gt; i.TestBase.User)
                  .Include(i =&gt; (i.TestBase as TestA).Item) // Error
                  .Include(i =&gt; (i.TestBase as TestA).Address) // Error
                  .FirstOrDefaultAsync(f =&gt; f.TestRootId == 1)
  
  context.TestRoot.Include(i =&gt; i.TestBase)
                  .Include(i =&gt; i.TestBase.User)
                  .Include(&quot;TestBase.Item&quot;) // Error
                  .Include(&quot;TestBase.Address&quot;) // Error
                  .FirstOrDefaultAsync(f =&gt; f.TestRootId == 1)
  </code></pre>
  <p>Error:
  A specified Include path is not valid. The EntityType 'TestBase' does not declare a navigation property with the name 'Item'</p>