/Ef_Inheritance

There is 3 approach for creating tables base on classes which inherited from a base class and derived the base class and were gonna to indicate these ways and create sample for each of them

Primary LanguageC#GNU General Public License v3.0GPL-3.0

💡 Ef core inheritance

There is 3 approach for creating tables base on classes which inherited from a base class and derived the base class and were gonna to indicate these ways and create sample for each of them.

By convention, EF will not automatically scan for base or derived types; this means that if you want a CLR type in your hierarchy to be mapped, you must explicitly specify that type on your model.

These solutions are dividing in 3 type

  1. Table-per-hierarchy (tph)
  2. Table-per-type (tpt)
  3. Table-per-concrete-type (tpc)

👁️‍🗨️ See also

🔗 Original_Documentation

🔗 TPH

🔗 TPT

🔗 TPC