System.Data.Entity.ModelConfiguration.Conventions Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Classes
AssociationInverseDiscoveryConvention |
Convention to detect navigation properties to be inverses of each other when only one pair of navigation properties exists between the related types. |
AttributeToColumnAnnotationConvention<TAttribute,TAnnotation> |
A general purpose class for Code First conventions that read attributes from .NET properties and generate column annotations based on those attributes. |
AttributeToTableAnnotationConvention<TAttribute,TAnnotation> |
A general purpose class for Code First conventions that read attributes from .NET types and generate table annotations based on those attributes. |
ColumnAttributeConvention |
Convention to process instances of ColumnAttribute found on properties in the model |
ColumnOrderingConvention |
Convention to apply column ordering specified via ColumnAttribute or the DbModelBuilder API. |
ColumnOrderingConventionStrict |
Convention to apply column ordering specified via ColumnAttribute or the DbModelBuilder API. This convention throws if a duplicate configured column order is detected. |
ColumnTypeCasingConvention |
Convention to convert any data types that were explicitly specified, via data annotations or DbModelBuilder API, to be lower case. The default SqlClient provider is case sensitive and requires data types to be lower case. This convention allows the System.ComponentModel.DataAnnotations.ColumnAttrbiute and DbModelBuilder API to be case insensitive. |
ComplexTypeAttributeConvention |
Convention to process instances of ComplexTypeAttribute found on types in the model. |
ComplexTypeDiscoveryConvention |
Convention to configure a type as a complex type if it has no primary key, no mapped base type and no navigation properties. |
ConcurrencyCheckAttributeConvention |
Convention to process instances of ConcurrencyCheckAttribute found on properties in the model. |
Convention |
A convention that doesn't override configuration. |
DatabaseGeneratedAttributeConvention |
Convention to process instances of DatabaseGeneratedAttribute found on properties in the model. |
DecimalPropertyConvention |
Convention to set precision to 18 and scale to 2 for decimal properties. |
DeclaredPropertyOrderingConvention |
Convention to move primary key properties to appear first. |
ForeignKeyAssociationMultiplicityConvention |
Convention to distinguish between optional and required relationships based on CLR nullability of the foreign key property. |
ForeignKeyDiscoveryConvention |
Base class for conventions that discover foreign key properties. |
ForeignKeyIndexConvention |
Convention to introduce indexes for foreign keys. |
ForeignKeyNavigationPropertyAttributeConvention |
Convention to process instances of ForeignKeyAttribute found on navigation properties in the model. |
ForeignKeyPrimitivePropertyAttributeConvention |
Convention to process instances of ForeignKeyAttribute found on foreign key properties in the model. |
IdKeyDiscoveryConvention |
Convention to detect primary key properties. Recognized naming patterns in order of precedence are:
|
IndexAttributeConvention |
A convention for discovering IndexAttribute attributes on properties and generating IndexAnnotation column annotations in the model. |
InversePropertyAttributeConvention |
Convention to process instances of InversePropertyAttribute found on properties in the model. |
KeyAttributeConvention |
Convention to process instances of KeyAttribute found on properties in the model. |
KeyDiscoveryConvention |
Base class for conventions that discover primary key properties. |
ManyToManyCascadeDeleteConvention |
Convention to add a cascade delete to the join table from both tables involved in a many to many relationship. |
MappingInheritedPropertiesSupportConvention |
Convention to ensure an invalid/unsupported mapping is not created when mapping inherited properties |
MaxLengthAttributeConvention |
Convention to process instances of MaxLengthAttribute found on properties in the model. |
NavigationPropertyNameForeignKeyDiscoveryConvention |
Convention to discover foreign key properties whose names are a combination of the dependent navigation property name and the principal type primary key property name(s). |
NotMappedPropertyAttributeConvention |
Convention to process instances of NotMappedAttribute found on properties in the model. |
NotMappedTypeAttributeConvention |
Convention to process instances of NotMappedAttribute found on types in the model. |
OneToManyCascadeDeleteConvention |
Convention to enable cascade delete for any required relationships. |
OneToOneConstraintIntroductionConvention |
Convention to configure the primary key(s) of the dependent entity type as foreign key(s) in a one:one relationship. |
PluralizingEntitySetNameConvention |
Convention to set the entity set name to be a pluralized version of the entity type name. |
PluralizingTableNameConvention |
Convention to set the table name to be a pluralized version of the entity type name. |
PrimaryKeyNameForeignKeyDiscoveryConvention |
Convention to discover foreign key properties whose names match the principal type primary key property name(s). |
PrimitivePropertyAttributeConfigurationConvention<TAttribute> |
Base class for conventions that process CLR attributes found on primitive properties in the model. |
PropertyAttributeConfigurationConvention<TAttribute> |
Base class for conventions that process CLR attributes found on properties of types in the model. |
PropertyMaxLengthConvention |
Convention to set a maximum length for properties whose type supports length facets. The default value is 128. |
RequiredNavigationPropertyAttributeConvention |
Convention to process instances of RequiredAttribute found on navigation properties in the model. |
RequiredPrimitivePropertyAttributeConvention |
Convention to process instances of RequiredAttribute found on primitive properties in the model. |
SqlCePropertyMaxLengthConvention |
Convention to set a default maximum length of 4000 for properties whose type supports length facets when SqlCe is the provider. |
StoreGeneratedIdentityKeyConvention |
Convention to configure integer primary keys to be identity. |
StringLengthAttributeConvention |
Convention to process instances of StringLengthAttribute found on properties in the model. |
TableAttributeConvention |
Convention to process instances of TableAttribute found on types in the model. |
TimestampAttributeConvention |
Convention to process instances of TimestampAttribute found on properties in the model. |
TypeAttributeConfigurationConvention<TAttribute> |
Base class for conventions that process CLR attributes found in the model. |
TypeNameForeignKeyDiscoveryConvention |
Convention to discover foreign key properties whose names are a combination of the principal type name and the principal type primary key property name(s). |
Interfaces
IConceptualModelConvention<T> |
A convention that operates on the conceptual section of the model after the model is created. |
IConvention |
Identifies conventions that can be added to or removed from a DbModelBuilder instance. |
IStoreModelConvention<T> |
A convention that operates on the database section of the model after the model is created. |
Entity Framework