Code First: Avoid discriminator column and keep inheritance

c# ef-code-first entity-framework-6

Accepted Answer

Two possibilities are:

  • Make BaseEntityabstract
  • Use modelBuilder.Ignore<BaseEntity>() in yourDbContext.OnModelCreating
11
6/24/2015 11:30:11 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow