Closed luizfbicalho closed 11 months ago
I'm also having the same error in a project where I force the Discriminator.
@ajcvickers Poaching this
Is this fix in the last release: 8.0.0-rc.2.23480.1?
@carumsoft No, but it is in the daily builds.
I've had this bug come up today too, but it was because I'd forgotten to add my subclasses to my database context as instances of DbSet
.
Can someone please tell me which build number has the fix now?
@ErcinDedeoglu try the latest package from the daily build feed.
File a bug
This error is caused by the use of the method modelBuilder.Entity().HasDiscriminator(); in the OnModelCreating method
In my case I have a lib dbcontext that is used in more projects, in this case I know that some entites will have subclasses, and in this case I added the HasDiscriminator() Method on the base DbContext
Include your code
Include stack traces
Include the full exception message and stack trace for any exception you encounter.
Use triple-tick fences for stack traces. For example:
Include verbose output
Please include
--verbose
output when filing bugs about thedotnet ef
or Package Manager Console tools.Use triple-tick fences for tool output. For example: