In the Table-Per-Hierarchy (TPH) inheritance strategy, how does Entity Framework differentiate between different types in a single table?

  • By adding a discriminator column
  • By creating a separate database for each type
  • By creating separate columns for each type
  • By using separate tables for each type
In the Table-Per-Hierarchy (TPH) inheritance strategy, Entity Framework differentiates between different types by adding a discriminator column to the table. This column stores a value that indicates the type of each entity. This approach allows all entities in the hierarchy to be stored in a single table, simplifying the database schema.
Add your answer
Loading...

Leave a comment

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