Skip to content

mucalo/ef-core-and-class-inheritance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EF Core and Class Inheritence

This repository goes with the EF Core and Class Inheritance blogpost: https://mariomucalo.com/efcore-and-class-inheritance

Depending on which class inheritance handling model in EF Core you want to model you need to uncomment the proper Context being used:

  • using (var ctx = new VehiclesContext()) for Table per Hierarchy
  • using (var ctx = new VehiclesTPTContext()) for Table per Type

If you're running for the first time on the given database, you can uncomment the code inside the AddingDataToDatabase region.

About

This repository goes with the EF Core and Class Inheritance blogpost: https://mariomucalo.com/efcore-and-class-inheritance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages