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.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *