Model Naming

On this tab of the Model Settings window you can set naming rules for entities and their members to be added from the database.

The Model Naming page is divided in two sections - Class and Method Names and Class Properties' Names. The options presented in both sections allow changing the names of classes, methods or their properties by adding or removing suffixes, prefixes etc.

Case

Changes the case of the letters in the name. Can take the following values:

Unchanged

Does not change the case.

Capitalized

The first letter of the entity name and the first letter after each underscore in the table name will be uppercase, other letters will be lowercase.

FirstLetterUppercase

The name of an entity begins with a capital letter, case of other letters will not be changed.

Lower

All letters in the name of an entity are converted to lower case.

Upper

All letters in the name of an entity are converted to upper case.

Remove Prefix(es)

Removes specified prefix(es).

Remove Suffix(es)

Removes specified suffix(es).

Add Prefix

Adds specified prefix.

Add Suffix

Adds specified suffix.

Pluralization

Unchanged

Does not change the number.

Singularize

Singularizes class, method or class property name.

Pluralize

Pluralizes class, method or class property name.

Remove underscore

Select this check box to remove underscores from the names of tables, views, columns and stored procedures when generating names for the corresponding model objects.

Remove invalid characters

Select this check box to remove characters, that cannot be used in class and member names, from the names of tables, views, columns and stored procedures when generating names for the corresponding model objects. If this check box is not selected, these characters are replaced with underscores.

EntitySet Pluralization

This option can be used for Entity Framework models, as their classes have the EntitySet property. It defines the property name generated in the context class. This name is automatically built upon the class name, in case it is not set manually. This option defines the way of composing this name. By default the name is pluralized.

Unchanged

Does not change the number.

Singularize

Singularizes classes' name.

Pluralize

Pluralizes classes' name.

Pluralize collection navigation properties

Provides the possibility to turn on and off the pluralization of the many-end names of associations.

Add constraint details to navigation properties

Select this check box to add a suffix with column names, by which the foreign key constraint is created in the data source, to the corresponding navigation property name when generating a class with navigation properties from a data source table.

Add schema as prefix

Select this check box to add schema name as a prefix to entity and method names.

The Example area fields show the current and expected name in the corresponding Original and Becomes fields.

 


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.