Model Settings

This dialog allows you to set model properties that affect code generation.

 

ExpandedToggleIcon        Model - General

Entity Framework Version

Specify the version of Entity Framework that will be used for your model. One of the following versions can be selected: 3.5, 4.x, 5 and 6.

Entity Container

The Entity Container containing all instances of entities for the Entity Data Model.

Namespace

The namespace of the conceptual model. Model classes will be put into this namespace when generating code.

Metadata Artifact Processing

Specifies whether to put model and mapping files (.csdl, .ssdl, and .msl files) into the output folder or embed them into an output assembly.

Access

Set the accessibility level of the DataContext class here.

Include foreign key columns in the model

Specify whether to include foreign key columns in the model. Not available for Entity Framework 1.

Detect function-based column default value

Defines whether columns having a function-based default value are interpreted as Identity.

View Generation

If selected, code for pre-generating views will be added, thus decreasing the first query execution time. Otherwise, the dynamic view generation will be performed when query is executed. That may have a serious negative impact on performance, when the first query is executed on a large model.

note Note

If the generated code is too large, you may encounter problems when working with it in Visual Studio.

Validate On Build

Select this check box to validate the model on build.

Lazy Loading Enabled

Select this check box to turn on Lazy Loading in your projects.

Preserve schema name in storage

If checked, preserves the name of the schema for model objects when they are added from the database.

Detect Many-To-Many associations

Select this check box to turn on the detection of many-to-many associations in your model.

Detect Table Per Type inheritances

Specifies whether inheritances of this type should be detected in the model automatically.

Use database comments

Determines whether comments for database objects, if supported by DBMS, will be used for model objects Documentation initialization and taken into account when executing model or database update operations.

Save connection settings in App.Config (Web.Config) as

Specifies whether the connection string should be saved in App.Config (or Web.Config) and allows specifying its name. If the check box is deselected, the connection string is specified explicitly in the model class constructor.

 

ExpandedToggleIcon        Model - General - Initialization

Class Initialization

This grid displays and allows managing the automatically added properties.

Add

Pressing this button calls the Property Editor dialog box that allows you to configure the automatically added property.

Edit

Pressing this button calls the Property Editor dialog box that allows you to change settings of the automatically added property.

Remove

Pressing this button deletes the selected property.

Property Initialization

Options that will be automatically set when creating a new property.

Precision

Defines the Precision property value for entity properties being created.

Scale

Defines the Scale property value for entity properties being created.

Max Length

Defines the Max Length property value for entity properties being created.

Default Unicode

Defines the Unicode property value for entity properties being created and having string data type.

Concurrency Check

Defines the concurrency mode for entity properties being created.

 

ExpandedToggleIcon        Model - Attributes

.NET attribute types used for specifying the model object attributes

Displays and allows managing assemblies and attributes types.

 

ExpandedToggleIcon        Model - Extended Properties

Association

Allows adding/removing extended properties for an association of the model. To add a custom property, click the Add button and edit its name, type and default value.

Class

Allows adding/removing extended properties for a class of the model. To add a custom property, click the Add button and edit its name, type and default value. The following properties are template-defined and can't be removed or edited.

If the model contains the Repository and Unit of Work template, the GenerateRepository property is added to the Extended properties.

If the model contains the MVC Controller template, the GenerateController property is added to the Extended properties.

If the model contains the MVC View Advanced template, the GenerateView property is added to the Extended properties.

Complex Type

Allows adding/removing extended properties for the complex type of the model. To add a custom property, click the Add button and edit its name, type and default value.

Enum Type

Allows adding/removing extended properties for an enumerated type of the model. To add a custom property, click the Add button and edit its name, type and default value.

Context Model

Allows adding/removing extended properties for the context of the model. To add a custom property, click the Add button and edit its name, type and default value.

Method

Allows adding/removing extended properties for a method of the model. To add a custom property, click the Add button and edit its name, type and default value.

Property

Allows adding/removing extended properties for a class property in the model. To add a custom property, click the Add button and edit its name, type and default value.

Relation Property

Allows adding/removing extended properties for the relation property of the model. To add a custom property, click the Add button and edit its name, type and default value.

Enum Type Member

Allows adding/removing extended properties for an enum type member of the model. To add a custom property, click the Add button and edit its name, type and default value.

 

ExpandedToggleIcon        Synchronization - Model Naming

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.

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.

 

ExpandedToggleIcon        Synchronization - Database Naming

The Database Naming page is divided in two sections - Table and Procedure Names and Table Columns' Names. The options presented in both sections allow to change the names of database objects and their members 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 entities or entity members' name.

Pluralize

Pluralizes entity or entity members' name.

Remove underscore

Select this check box to remove underscores from the names of the generated tables, views, and columns.

In the Example section, the current and expected names are shown in the corresponding Original and Becomes fields.

 

ExpandedToggleIcon        Synchronization - Mapping

Enable automatic synchronization of the storage part and mapping of the model with its conceptual part.

Enables synchronization between the conceptual model and the storage part without storage part re-generation.

Target Server

Specifies the database server.

Server Version

Specifies the version of the database server.

Target Schema

Specifies the default schema of the database server.

Data Provider

Specifies the ADO.NET data provider used to connect to the server.

 

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.