C
C#2y ago
kotrunga

✅ 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
jcotton42
jcotton422y ago
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).
Anton
Anton2y ago
discriminator is the "discriminated" in "discriminated union"
Pobiega
Pobiega2y ago
a special column in the database that has a value indicating what type to map the row into.
kotrunga
kotrungaOP2y ago
Thanks all!
Pobiega
Pobiega2y ago
$close
MODiX
MODiX2y ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server