Sometimes, during Model First Scenario, the generated database artifact names are not always what you would expect. For example, you may have a class named "ShipAddress" with a field named "spAdr" and the generated database column will be "sp_adr". Telerik Data Access allows you to specify various naming rules and settings that will be applied on the generated relational items (tables and columns) during Model First Scenario. For example, it is possible to instruct Telerik Data Access to use the property name as it is for the column name. The same is valid for the default table name, i.e. it could be based on the class name. The main benefit is that you have control over the generated column names and you don't have to manually change the column name(s) for each field/property. You will always get similar column names based on what you see in the conceptual (domain) model.
Generally, there are two possible ways for specifying database naming rules:
- During the process of domain model generation (using the Telerik Data Access New Domain Model wizard). When the selected domain model type is Empty Domain Model, then the second page in the wizard is the Define Relational Naming Settings dialog.
- After the domain model is generated, via the Model Settings Dialog in the Visual Designer.
The rules described in this section apply to Model First Scenario only.
When you add a new Telerik Data Access Domain Model to your project, the Telerik Data Access New Domain Model wizard runs. When the selected domain model type is Empty Domain Model, then the second step in that wizard is the Define Relational Naming Settings dialog.
In this dialog, you can specify how tables and columns are generated when you update your database schema to the latest model state by using the Update Database from Model Wizard.
The Preview Result area allows you to see how the corresponding database artifact look before and after any settings are specified.
In this section: