Export (0) Print
Expand All
Expand Minimize

System.Data.Entity.ModelConfiguration.Conventions Namespace

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

The System.Data.Entity.ModelConfiguration.Conventions namespace contains classes that describe a set of rules that are used to automatically configure a conceptual model based on class definitions when working with Code First.

  ClassDescription
Public classAssociationInverseDiscoveryConventionProvides convention to detect navigation properties to be inverses of each other when only one pair of navigation properties exists between the related types.
Public classAttributeToColumnAnnotationConvention<TAttribute, TAnnotation>A general purpose class for Code First conventions that read attributes from .NET properties and generate column annotations based on those attributes.
Public classAttributeToTableAnnotationConvention<TAttribute, TAnnotation>A general purpose class for Code First conventions that read attributes from .NET types and generate table annotations based on those attributes.
Public classColumnAttributeConventionRepresents a convention to process instances of ColumnAttribute found on properties in the model.
Public classColumnOrderingConventionRepresents a convention to apply column ordering specified via ColumnAttribute or the DbModelBuilder API.
Public classColumnOrderingConventionStrictConvention to apply column ordering specified via ColumnAttribute or the DbModelBuilder API. This convention throws if a duplicate configured column order is detected.
Public classComplexTypeAttributeConventionRepresents the convention to process instances of ComplexTypeAttribute found on types in the model.
Public classComplexTypeDiscoveryConventionRepresents a convention to configure a type as a complex type if it has no primary key, no mapped base type and no navigation properties.
Public classConcurrencyCheckAttributeConventionRepresents the convention to process instances of ConcurrencyCheckAttribute found on properties in the model.
Public classConventionA convention that doesn't override configuration.
Public classDatabaseGeneratedAttributeConventionRepresents a convention to process instances of DatabaseGeneratedAttribute found on properties in the model.
Public classDecimalPropertyConventionConvention to set precision to 18 and scale to 2 for decimal properties.
Public classDeclaredPropertyOrderingConventionRepresents a convention to move primary key properties to appear first.
Public classForeignKeyAssociationMultiplicityConventionRepresents a convention to distinguish between optional and required relationships based on CLR nullability of the foreign key property.
Public classForeignKeyDiscoveryConventionRepresents a base class for conventions that discover foreign key properties.
Public classForeignKeyIndexConventionRepresents a convention to introduce indexes for foreign keys.
Public classForeignKeyNavigationPropertyAttributeConventionRepresents a convention to process instances of ForeignKeyAttribute found on navigation properties in the model.
Public classForeignKeyPrimitivePropertyAttributeConventionRepresents a convention to process instances of ForeignKeyAttribute found on foreign key properties in the model.
Public classIdKeyDiscoveryConventionConvention to detect primary key properties. Recognized naming patterns in order of precedence are: 1. 'Id' 2. [type name]Id Primary key detection is case insensitive.
Public classIndexAttributeConventionA convention for discovering IndexAttribute attributes on properties and generating IndexAnnotation column annotations in the model.
Public classInversePropertyAttributeConventionRepresents a convention to process instances of InversePropertyAttribute found on properties in the model.
Public classKeyAttributeConventionConvention to process instances of KeyAttribute found on properties in the model.
Public classKeyDiscoveryConventionRepresents a base class for conventions that discover primary key properties.
Public classManyToManyCascadeDeleteConventionConvention to add a cascade delete to the join table from both tables involved in a many to many relationship.
Public classMappingInheritedPropertiesSupportConventionConvention to ensure an invalid/unsupported mapping is not created when mapping inherited properties
Public classMaxLengthAttributeConventionRepresents a convention to process instances of MaxLengthAttribute found on properties in the model.
Public classNavigationPropertyNameForeignKeyDiscoveryConventionConvention 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).
Public classNotMappedPropertyAttributeConventionRepresents a convention to process instances of NotMappedAttribute found on properties in the model.
Public classNotMappedTypeAttributeConventionRepresents a convention to process instances of NotMappedAttribute found on types in the model.
Public classOneToManyCascadeDeleteConventionProvides a convention to enable cascade delete for any required relationships.
Public classOneToOneConstraintIntroductionConventionProvides a convention to configure the primary key(s) of the dependent entity type as foreign key(s) in a one:one relationship.
Public classPluralizingEntitySetNameConventionRepresents a convention to set the entity set name to be a pluralized version of the entity type name.
Public classPluralizingTableNameConventionRepresents a convention to set the table name to be a pluralized version of the entity type name.
Public classPrimaryKeyNameForeignKeyDiscoveryConventionConvention to discover foreign key properties whose names match the principal type primary key property name(s).
Public classPrimitivePropertyAttributeConfigurationConvention<TAttribute>Base class for conventions that process CLR attributes found on primitive properties in the model.
Public classPropertyAttributeConfigurationConvention<TAttribute>Base class for conventions that process CLR attributes found on properties of types in the model.
Public classPropertyMaxLengthConventionRepresents a convention to set a maximum length for properties whose type supports length facets. The default value is 128.
Public classRequiredNavigationPropertyAttributeConventionConvention to process instances of RequiredAttribute found on navigation properties in the model.
Public classRequiredPrimitivePropertyAttributeConventionRepresents a convention to process instances of RequiredAttribute found on primitive properties in the model.
Public classSqlCePropertyMaxLengthConventionRepresents a convention to set a default maximum length of 4000 for properties whose type supports length facets when SqlCe is the provider.
Public classStoreGeneratedIdentityKeyConventionRepresents a convention to configure integer primary keys to be identity.
Public classStringLengthAttributeConventionRepresents a convention to process instances of StringLengthAttribute found on properties in the model.
Public classTableAttributeConventionRepresents a convention to process instances of TableAttribute found on types in the model.
Public classTimestampAttributeConventionRepresents a convention to process instances of TimestampAttribute found on properties in the model.
Public classTypeAttributeConfigurationConvention<TAttribute>Base class for conventions that process CLR attributes found in the model.
Public classTypeNameForeignKeyDiscoveryConventionConvention to discover foreign key properties whose names are a combination of the principal type name and the principal type primary key property name(s).

  InterfaceDescription
Public interfaceIConceptualModelConvention<T>A convention that operates on the conceptual section of the model after the model is created.
Public interfaceIConventionIdentifies conventions that can be added to or removed from a DbModelBuilder instance.
Public interfaceIStoreModelConvention<T>A convention that operates on the database section of the model after the model is created.
Show:
© 2014 Microsoft