Export (0) Print
Expand All
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

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 classAssociationInverseDiscoveryConventionConvention 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 classColumnAttributeConventionConvention to process instances of ColumnAttribute found on properties in the model
Public classColumnOrderingConventionConvention 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 classComplexTypeAttributeConventionConvention to process instances of ComplexTypeAttribute found on types in the model.
Public classComplexTypeDiscoveryConventionConvention to configure a type as a complex type if it has no primary key, no mapped base type and no navigation properties.
Public classConcurrencyCheckAttributeConventionConvention to process instances of ConcurrencyCheckAttribute found on properties in the model.
Public classConventionA convention that doesn't override configuration.
Public classDatabaseGeneratedAttributeConventionConvention 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 classDeclaredPropertyOrderingConventionConvention to move primary key properties to appear first.
Public classForeignKeyAssociationMultiplicityConventionConvention to distinguish between optional and required relationships based on CLR nullability of the foreign key property.
Public classForeignKeyDiscoveryConventionBase class for conventions that discover foreign key properties.
Public classForeignKeyIndexConventionConvention to introduce indexes for foreign keys.
Public classForeignKeyNavigationPropertyAttributeConventionConvention to process instances of ForeignKeyAttribute found on navigation properties in the model.
Public classForeignKeyPrimitivePropertyAttributeConventionConvention 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 classInversePropertyAttributeConventionConvention 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 classKeyDiscoveryConventionBase 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 classMaxLengthAttributeConventionConvention 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 classNotMappedPropertyAttributeConventionConvention to process instances of NotMappedAttribute found on properties in the model.
Public classNotMappedTypeAttributeConventionConvention to process instances of NotMappedAttribute found on types in the model.
Public classOneToManyCascadeDeleteConventionConvention to enable cascade delete for any required relationships.
Public classOneToOneConstraintIntroductionConventionConvention to configure the primary key(s) of the dependent entity type as foreign key(s) in a one:one relationship.
Public classPluralizingEntitySetNameConventionConvention to set the entity set name to be a pluralized version of the entity type name.
Public classPluralizingTableNameConventionConvention 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 classPropertyMaxLengthConventionConvention 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 classRequiredPrimitivePropertyAttributeConventionConvention to process instances of RequiredAttribute found on primitive properties in the model.
Public classSqlCePropertyMaxLengthConventionConvention to set a default maximum length of 4000 for properties whose type supports length facets when SqlCe is the provider.
Public classStoreGeneratedIdentityKeyConventionConvention to configure integer primary keys to be identity.
Public classStringLengthAttributeConventionConvention to process instances of StringLengthAttribute found on properties in the model.
Public classTableAttributeConventionConvention to process instances of TableAttribute found on types in the model.
Public classTimestampAttributeConventionConvention 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.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.