LINQ to Entities supports three types of inheritance:

  • Table per Hierarchy (TPH) inheritance
  • Table per Type (TPT) inheritance
  • Table per Concrete (TPC) inheritance

As Table per Concrete inheritance is not used as often as Table per Hierarchy and Table per Type inheritances, in this book we will only cover the first two inheritance types.

LINQ to Entities Table per Hierarchy inheritance

In Table per Hierarchy inheritance, there is a single database table that contains fields for both parent information and child information. With relational data, a discriminator column contains the value that determines which class any given record belongs to.

For example, consider a Persons table that contains everyone employed by a company. Some people ...

Get WCF 4.5 Multi-Layer Services Development with Entity Framework now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.