Which approach does Entity Framework use by default for mapping inheritance hierarchies?
- Single Table Inheritance
- Table-per-Concrete-Class (TPC)
- Table-per-Hierarchy (TPH)
- Table-per-Type (TPT)
Entity Framework uses Table-per-Hierarchy (TPH) inheritance by default for mapping inheritance hierarchies. This means that all types in the inheritance hierarchy are mapped to a single table in the database, with a discriminator column used to differentiate between the types. While this approach simplifies the database schema, it may lead to null values and can be less performant when dealing with complex inheritance hierarchies.
Loading...
Related Quiz
- When addressing breaking changes, understanding the ________ of the EF update is essential for complex projects.
- If you need to implement a complex inheritance structure for your Entity Types, what strategies would you consider in Entity Framework?
- The ________ strategy involves creating a single table for the base class and separate tables for each derived class.
- Which Entity Framework feature allows you to automatically validate entities before saving them to the database?
- To enable caching in Entity Framework, you can use ________ libraries or frameworks.