General

This page of the Model Settings dialog box is intended for Entity Framework Core model properties customization. Here you can specify Database-First settings for Entity Developer behavior management during the process of adding objects from database to model. Here you can also set default values for some properties of objects composing the model, such as e.g. Default Unicode. In fact, this tab is a more convenient representation of the basic model properties and Entity Developer behavior settings towards the specific model. To edit the full list of model properties, open the Properties window.

ExpandedToggleIcon        Database First Settings

Use shadow foreign key properties

Determines whether properties generated from database foreign key columns are added to the model as shadow properties.

Detect Many-to-Many associations

Controls the detection of many-to-many associations in your projects. Available only for Entity Framework Core 5.

Detect Table Per Type inheritances

Controls the detection of TPT inheritances. Available only for Entity Framework Core 5.

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 to

Determines where to store the connection string: in Model file, Entity Developer storage, or in Environment variable.

Use the connection string from App.config

Allows you to specify the connection string name in the App.config file to use.

Rewrite connection string during regeneration

If selected, Entity Developer will rewrite the specified connection string in the App.config file with the current connection settings every time when the code and mapping is generated for the model.

Use lazy-loading proxies

Determines whether to enable lazy loading for all the associations in the model by default. If necessary, you can enable it separately for each association.

Preserve schema name in storage

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

Preserve columns details

Specifies whether full information about the column should be preserved.

Preserve columns SqlType and Default

Specifies whether only full information about the type should be preserved.

Execute procedures for result set generation

In order to obtain metadata of a procedure or function result set, it is necessary to execute the procedure or function, which may cause undesirable changes of database data or schema. If this check box is not selected, no procedures or functions are executed.

Use NULL parameter values

Specifies whether NULL parameter values are used for stored procedure execution.

If this this check box is not selected, Entity Developer always prompts the user to enter parameter values to use when adding database stored routines to the model.
If this check box is selected, Entity Developer always uses null values for stored routine parameters when adding database stored routines to the model.
If the check box is in the indeterminate state (default state), Entity Developer prompts the user to enter parameter values when adding stored routines from the database explorer, but uses null values when adding stored routines to the model using Create Model Wizard and Update Model From Database Wizard.

Add complex types to diagram

If this check box is selected, Create Model Wizard and Update Model From Database Wizard will add complex types to the diagram.

Detect function-based column default value

Determines whether to set the Value Generated property of the columns, having a function-based default value, to OnAdd when generating entity classes from database tables/views.

Private setter for store generated properties

Determines whether to generate setter as private for properties, corresponding to database-generated columns.

Constructor parameter

Determines whether to generate constructor parameters for properties, corresponding to database-generated columns.

 

EF Core version

Target Entity Framework Core version - EF Core 1, 2, 3, 5, or 6. Note that only the versions supported by the target .NET framework of your project are available. This setting affects code generation, but if you have specified one version when creating the model and selected another version later, you need to manually reinstall the required NuGet packages.

Context Namespace

Defines the namespace to be used for the context class.

Entities Namespace

Defines the namespace to be used for the entities added to model.

Default Schema

Makes it possible to define a default schema for database tables.

Default Precision

Specifies the default precision for the columns, to which the numeric properties are mapped.

Default Scale

Specifies the default scale for the columns, to which the numeric properties are mapped.

Default Length

Specifies the default length for the columns, to which the string properties are mapped.

Default Unicode

Specifies whether to use the Unicode encoding for database columns by default.

 


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.