Entity Framework Tutorial
Lesson 22 of 69 · Part 20 Table Per Type TPT inheritance in entity framework · Database
Part 20 Table Per Type TPT inheritance in entity framework
Text version of the video
http://csharp-video-tutorials.blogspot.com/2014/06/part-20-table-per-type-tpt-inheritance.html
Slides
http://csharp-video-tutorials.blogspot.com/2014/06/part-20-table-per-type-tpt-inheritance_8.html
Entity Framework – All Text Articles
http://csharp-video-tutorials.blogspot.com/2014/05/entity-framework-tutorial.html
Entity Framework – All Slides
http://csharp-video-tutorials.blogspot.com/2014/05/entity-framework-tutorial-slides.html
Entity Framework Playlist
Dot Net, SQL, Angular, JavaScript, jQuery and Bootstrap complete courses
https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd
In this video we will discuss implementing Table Per Type (TPT) inheritance in entity framework with database first approach. In TPT inheritance one database table per type is used to store data for the respective entity types in the inheritance hierarchy. This means there is no problem of de-normalized tables.
In Parts 18 and 19 of Entity Framework tutorial we discussed how inheritance hierarchy can be represented using Table Per Hierarchy (TPH). With TPH one database table is used to store data of all the entity types in the inheritance hierarchy. The downside of this is that we have a denormalized table and some columns will have NULL values depending on the type of the derived object being saved to the database table.