I use a single table, tbl_Person, to map a hierarchy, like this example, where Person is abstract :
And I use this mapping using Fluent API:
modelBuilder.Entity<Person>() .ToTable("tbl_Person") .HasKey(m => m.PersonID) .Map<Student =>(m.Requires (discrimination stuff) ) .Map<Instructor>(m => m.Requires (discrimination stuff) )
And then later, I added another kind of Person to my model. Let's say a "Director" but I forgot to add the mapping. That got me the error whenever I would try to use a DbContext. So I just added the mapping for "Director" and the error went away.
By the way, a discriminator column can be NOT NULL and have no default value, as opposed to what the error lead me to think.
Coffee time!
1 comment:
QuickBooks Error 15241 usually occurs during QuickBooks Desktop updates. It indicates issues with the payroll update. Resolve it by updating QuickBooks Desktop and ensuring proper installation of payroll updates.
QuickBooks Error 15241
How to Fix QuickBooks Error 15240
Quickbooks Error 12152
Post a Comment