Yes, thatβs how Entity Designer works. If you model your structure in the database and use the update model from the database, it will really be modeled, since the general beacuse EF associations do not yet know that you want to model it as inheritance. You will receive the following:

You must manually modify this model to use TPT inheritance. Delete both relationships first. It will also remove the navigation properties and you will get the following:

Use Inheritance from the toolbar (as described in the previous screenshot) and draw a line from Film to Item and from Game to Item . Now you need to finish this model. The current model will not be validated because the ItemId displayed in both the parent and the child. Remove ItemId from the Film and Game objects. You can also create an Item Abstract object, and you get the following:

Ladislav Mrnka
source share