In This Topic
dotConnect for Oracle includes settings for configuring DDL generation in Entity Framework Code First. The following settings are available.
RemoveSchemaFromDefaultConstraintName - When set to true, the schema (database) name prefix is removed from default constraint names (primary keys, foreign keys) generated by Code-First Migrations. Default value is true.
- AddTableNameInDefaultIndexName - When set to true, the table name is added to default index name generated by Code-First Migrations (like 'IX_TableName_ColumnName').
When set to false, then default index names will be like 'IX_ColumnName'.
Default value is true.
- TruncateLongDefaultNames - When set to true, long default names of triggers, sequences, indexes, primary keys, and foreign keys,
generated by Code-First Migrations, will be truncated to 30 symbols.
When set to false, an exception will be raised for long default names.
Be careful when setting the property to true, because checks for uniqueness of names are not performed.
Default value is true.
UseNonUnicodeStrings - When set to true, string properties without explicitly specified server data type will be treated as non-unicode. Default value is false.
By default, Entity Framework considers all the string properties as Unicode and maps them to NCHAR, NVARCHAR, and NCLOB columns depending on other property parameters when creating/updating database structure. If you want to use CHAR, VARCHAR2, and CLOB columns for string properties by default, set this option to true.
UseNonLobStrings - When set to true, string properties without explicitly specified server data type will be treated as non-LOBs. Default value is false.
- ColumnTypeCasingConventionCompatibility - This option allows you to avoid explicitly turning off the ColumnTypeCasingConvention for each DbContext when working with Devart dotConnect for Oracle.
By default it is set to false.
When using XML mapping (Entity Framework v1 and v4) - a edmx/edml file and ObjectContext or DbContext in the XML mapping mode - this option must be FALSE.
When using Entity Framework Code First (Entity Framework v1 and v4), this option can be true or false, but if it is set to false,
you must turn off ColumnTypeCasingConvention explicitly for each DbContext.
This option must be True for EF Code-First Migrations (EF v4.3.x and v5.x) to work correctly.
- UseDateTimeAsDate - When set to true, DateTime properties without as explicitly specified server data type will be treated as DATE. Default value is false.
These options can be set either in code as the properties of the EntityProviderConfig.CodeFirstOptions object or in the project config file as the attributes of the CodeFirstOptions element of the Devart.Data.Oracle.Entity tag.