✅ What is a Discriminator?
Can someone please expand a bit more on what a Discriminator specifically is? There is some detail in the MS docs - but what is it in general? What are all the ways it can be used?
References:
https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.metadata.builders.discriminatorbuilder?view=efcore-7.0
https://learn.microsoft.com/en-us/ef/core/modeling/inheritance
Thank you!
7 Replies
From the article
The model above is mapped to the following database schema (note the implicitly created Discriminator column, which identifies which type of Blog is stored in each row).
discriminator is the "discriminated" in "discriminated union"
Designer TPH Inheritance - EF6
Designer TPH Inheritance in Entity Framework 6
a special column in the database that has a value indicating what type to map the row into.
Thanks all!
$close
Use the
/close
command to mark a forum thread as answered