title: Identity and inheritance Error On Migration: A key cannot be configured on 'Person' because it is a derived type
body: <p>I'm using EF Core and Identity.
  I have created a simple app:</p>
  
  <pre><code>public class Program
  {
      static void Main(string[] args)
      {
      }
  }
  
  
  public class User : IdentityUser
  {
  }
  
  public class Person : User
  {
  }
  
  public class Document
  {
      public int Id { get; set; }
  
      public User Owner { get; set; }
  }
  
  
  public class ApplicationDbContext : IdentityDbContext&lt;Person&gt;
  {
      public DbSet&lt;Person&gt; Person { get; set; }
      public DbSet&lt;Document&gt; Document { get; set; }
  
      protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
      {
          optionsBuilder.UseSqlServer(@"Server=.\;Database=EFCoreDemo;Trusted_Connection=True;MultipleActiveResultSets=true");
      }
  }
  </code></pre>
  
  <p>When I want to add a migration It gave me this error:</p>
  
  <blockquote>
    <p>A key cannot be configured on 'Person' because it is a derived type. The key must be configured on the root type 'User'. If you did not intend for 'User' to be included in the model, ensure that it is not included in a DbSet property on your context, referenced in a configuration call to ModelBuilder, or referenced from a navigation property on a type that is included in the model.</p>
  </blockquote>
  
  <p>I have tested these changes:</p>
  
  <p>1) If Owner became of type Person the error goes, but this is not an option for me because in fact User and Document are in a library and my final app use that library and Person is in the App. </p>
  
  <p>2) If ApplicationDbContext inherits from DbContext the error goes.</p>
  
  <p>Is there any workaround available?</p>