Uploaded July 2026 | Updated September 2026, 1 week ago
C# 15 brings union types, but EF Core will not persist them. So, turn the structure into a discriminated union of records and let EF Core map it with table-per-hierarchy, straight into the containing entity's own table, with no manual data model and no JOIN on read.
Support me on Patreon ⺠patreon.com/zoranhorvat
You can also learn much more from these wonderful resources:
ð¿ð€ð¢ððð£ ðð€ððð¡ðð£ð ðððð ððªð£ðð©ðð€ð£ðð¡ by Scott Wlaschin ⺠codinghelmet.com/go/wlaschin-functional-modeling-made-functional#ad
ððªð£ðð©ðð€ð£ðð¡ ðð§ð€ðð§ðð¢ð¢ðð£ð ðð£ ðŸ# by Enrico Buonanno ⺠codinghelmet.com/go/buonanno-functional-programming#ad
ð¿ð€ð¢ððð£-ð¿ð§ðð«ðð£ ð¿ððšððð£ by Eric Evans ⺠codinghelmet.com/go/book-domain-driven-design#ad
ðœðððð£ð£ðð£ð ðððððð©-ðð§ððð£ð©ðð ðð§ð€ðð§ðð¢ð¢ðð£ð ð¬ðð©ð ðŸ# at Udemy ⺠codinghelmet.com/go/beginning-oop-with-csharp
ððð£ððš ð€ð£ ðŸ# .ððð: ðð£ð©ðð©ð® ðð§ðð¢ðð¬ð€ð§ð ðŸð€ð§ð at Udemy ⺠codinghelmet.com/go/hands-on-csharp-ef-core
ðŒðð«ðð£ððð ðŸ# ðð§ð€ðð§ðð¢ð¢ðð£ð ðð£ .ððð ðŸð€ð§ð at Coursera ⺠codinghelmet.com/go/advanced-csharp-programming
Join the Discord server with topics on C# ⺠codinghelmet.com/go/discord
Subscribe ⺠youtube.com/channel/UCxsWfh8LCcn55mFB6zGBT1g?sub_confirmation=1
â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬
ðš About Me ðš
Hi, Iâm Zoran, I have more than 25 years of experience as a software developer, architect, team lead, and more. I have been programming in C# since its inception in the early 2000s. Since 2017 I have started publishing professional video courses at Pluralsight and Udemy and by this point, there are over 100 hours of the highest-quality videos you can watch on those platforms. On my YouTube channel, you can find shorter video forms focused on clarifying practical issues in coding, design, and architecture of .NET applications.â€ïž
â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬
â¡ïžCOPYRIGHT NOTICE:
The Copyright Laws of the United States recognize a âfair useâ of copyrighted content. Section 107 of the U.S. Copyright Act states: âNotwithstanding the provisions of sections 106 and 106A, the fair use of a copyrighted work, including such use by reproduction in copies or phono records or by any other means specified by that section, for purposes such as criticism, comment, news reporting, teaching (including multiple copies for classroom use), scholarship, or research, is not an infringement of copyright." This video and our youtube channel, in general, may contain certain copyrighted works that were not specifically authorized to be used by the copyright holder(s), but which we believe in good faith are protected by federal law and the Fair use doctrine for one or more of the reasons noted above.
C# 15 brings union types, but EF Core will not persist them. So, turn the structure into a discriminated union of records and let EF Core map it with table-per-hierarchy, straight into the containing entity's own table, with no manual data model and no JOIN on read.
Support me on Patreon ⺠patreon.com/zoranhorvat
You can also learn much more from these wonderful resources:
ð¿ð€ð¢ððð£ ðð€ððð¡ðð£ð ðððð ððªð£ðð©ðð€ð£ðð¡ by Scott Wlaschin ⺠codinghelmet.com/go/wlaschin-functional-modeling-made-functional#ad
ððªð£ðð©ðð€ð£ðð¡ ðð§ð€ðð§ðð¢ð¢ðð£ð ðð£ ðŸ# by Enrico Buonanno ⺠codinghelmet.com/go/buonanno-functional-programming#ad
ð¿ð€ð¢ððð£-ð¿ð§ðð«ðð£ ð¿ððšððð£ by Eric Evans ⺠codinghelmet.com/go/book-domain-driven-design#ad
ðœðððð£ð£ðð£ð ðððððð©-ðð§ððð£ð©ðð ðð§ð€ðð§ðð¢ð¢ðð£ð ð¬ðð©ð ðŸ# at Udemy ⺠codinghelmet.com/go/beginning-oop-with-csharp
ððð£ððš ð€ð£ ðŸ# .ððð: ðð£ð©ðð©ð® ðð§ðð¢ðð¬ð€ð§ð ðŸð€ð§ð at Udemy ⺠codinghelmet.com/go/hands-on-csharp-ef-core
ðŒðð«ðð£ððð ðŸ# ðð§ð€ðð§ðð¢ð¢ðð£ð ðð£ .ððð ðŸð€ð§ð at Coursera ⺠codinghelmet.com/go/advanced-csharp-programming
Join the Discord server with topics on C# ⺠codinghelmet.com/go/discord
Subscribe ⺠youtube.com/channel/UCxsWfh8LCcn55mFB6zGBT1g?sub_confirmation=1
â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬
ðš About Me ðš
Hi, Iâm Zoran, I have more than 25 years of experience as a software developer, architect, team lead, and more. I have been programming in C# since its inception in the early 2000s. Since 2017 I have started publishing professional video courses at Pluralsight and Udemy and by this point, there are over 100 hours of the highest-quality videos you can watch on those platforms. On my YouTube channel, you can find shorter video forms focused on clarifying practical issues in coding, design, and architecture of .NET applications.â€ïž
â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬â¬
â¡ïžCOPYRIGHT NOTICE:
The Copyright Laws of the United States recognize a âfair useâ of copyrighted content. Section 107 of the U.S. Copyright Act states: âNotwithstanding the provisions of sections 106 and 106A, the fair use of a copyrighted work, including such use by reproduction in copies or phono records or by any other means specified by that section, for purposes such as criticism, comment, news reporting, teaching (including multiple copies for classroom use), scholarship, or research, is not an infringement of copyright." This video and our youtube channel, in general, may contain certain copyrighted works that were not specifically authorized to be used by the copyright holder(s), but which we believe in good faith are protected by federal law and the Fair use doctrine for one or more of the reasons noted above.










