C
C#16mo 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
jcotton4216mo 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
Anton16mo ago
discriminator is the "discriminated" in "discriminated union"
Pobiega
Pobiega16mo ago
a special column in the database that has a value indicating what type to map the row into.
kotrunga
kotrunga16mo ago
Thanks all!
Pobiega
Pobiega16mo ago
$close
MODiX
MODiX16mo ago
Use the /close command to mark a forum thread as answered
Want results from more Discord servers?
Add your server
More Posts
❔ GUI tabs not showingThe gui tabs that i am using (Unity ImGui) aren't showing on the gui when opened.❔ Synchronise an object across two threads?Hello. I have an object that I use to wait listen for a message from a TcpConnection. However, while❔ Ok to reference both a nuget package, and the project source it's built from while I make changes?I'm wondering about the best practice handling a project that I am deploying privately as a nuget pa❔ VS SQL Server Object Explorer Default Click BehaviorIs there an option for changing the on click behavior of items in the SQL Server Object Explorer lik❔ Regex helpI have this regex: ```(?<![\[\]])(?:"&QUOTE&"([^"]*?)"&QUOTE&"|[^",\[\]]+)(?![\[\]])``` And when p❔ E2E Test - Start MVC projectHi, im using a testing tool for E2E testing and wondered how to get a MVC project started so the t❔ implementing licensing system in my appHi guys, I would like to implement some kind of license system to my app written in c#. I've been coI want to connect an esp32 to VS (WPF) C# via BLE, can anyone help? Maybe a tutorial or an example?I want to read some sensors with the ESP32 Dev, this works very well and i can display the data in m✅ ResolvePackageAssets is failing because it can't find the NuGet fallback folderI installed something called Godot portably on a USB which ended up being more invasive than everybo❔ How to calculate event expression?like ```c# var result = a+b-c+d-c+d-b+a; ``` ``a,b,c,d`` are all events, and each of them contains m