This wizard is designed for work with multiple diagram objects at a time. It allows you to avoid excessive steps characteristic for manual creation of TPT and TPC inheritances as they are created automatically by Entity Developer. This functionality is available in full for Entity Framework and NHibernate models, partly for LinqConnect and Entity Framework Core models (except for TPC hierarchy creation) and is not available for LINQ to SQL models.
To perform model refactoring, select the required model objects, e.g. several classes having a set of similar properties, call the context menu and select the Model Refactoring menu item.
The Choose Action page of the Model Refactoring Wizard is displayed:
It provides the following options:
New complex type - selecting this option will create a new complex type based on two or more common properties of selected classes. The existing common properties in classes will be replaced with a new complex type property of this type.
Existing complex type - select this option to use an existing complex type compatible with the set of properties of the selected classes.The existing common properties in classes will be replaced with a new complex type property of this type.
Table-Per-Type Hierarchy (TPT) - selecting this option will create a Table-Per-Type (TPT) Hierarchy based on the selected classes. One-to-one associations between classes will be replaced with inheritances.
Table-Per-Concrete-Type Hierarchy (TPC) - selecting this option will create a Table-Per-Concrete-Type (TPC) Hierarchy based on the selected classes. When creating this hierarchy, a new base class with properties common to all the selected classes will be created.
Clicking the Preview link will display properties of the object you will get as a result of the selected action.