On this tab you can set special rules for generating default names of database objects to be applied in various cases of the Model First approach usage. When setting these rules, you can use predefined keywords which will be replaced with the corresponding values.
Defines special naming rules for primary key columns. Predefined keywords, which will be replaced with corresponding values are: %entity name%, %property name%.
%entity name%
Name of the entity, containing the simple type property, the column is generated for.
%property name%
Name of the entity key property, the column is generated for.
Defines special naming rules for foreign key columns. Predefined keywords, which will be replaced with corresponding values are: %entity name%, %master entity name%, %master property name%, %master column name% .
%entity name%
Name of the dependent entity.
%master entity name%
Name of the master entity, the foreign key refers to.
%master property name%
Name of the entity key property of the master entity, the foreign refers to.
%master column name%
Name of the column, the corresponding entity key property of the foreign key master entity is mapped to.
Defines special naming rules for discriminator columns for TPH inheritances. Predefined keywords, which will be replaced with corresponding values are: %base entity name%.
%base entity name%
Name of the base entity of the TPH hierarchy.
Example 1Suppose, that the default value of the Primary Key Column special rule is changed to %property name%ID. This means, that if we add a new entity key to a class, and call it, for example, Employee, the corresponding automatically generated name of the table column will be EmployeeID. Example 2Suppose, we have a model containing the Address complex type with the City and PostalCode properties, and the Employee class with a set of properties including the ShipAddress complex type property. As the Complex Type Property Columns special rule is set to %parent property prefix% %property name%, the names for database columns corresponding to the Address complex type properties are automatically generated equal to ShipCity and ShipPostalCode, since Ship is actually a prefix. Thus, the Employees table contains a set of columns including ShipCity and ShipPostalCode. |