ConventionSet Class
Definition
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.
Represents a set of conventions used to build a model.
public class ConventionSet
type ConventionSet = class
Public Class ConventionSet
- Inheritance
-
ConventionSet
Remarks
See Model building conventions for more information and examples.
Constructors
ConventionSet() |
Properties
BaseEntityTypeChangedConventions |
Conventions to run when the base entity type is changed. |
BaseEntityTypeSetConventions |
Conventions to run when the base entity type is set or removed. |
ComplexPropertyAddedConventions |
Conventions to run when an entity type is added to the model. |
ComplexPropertyAnnotationChangedConventions |
Conventions to run when an annotation is set or removed on a complex property. |
ComplexPropertyFieldChangedConventions |
Conventions to run when the field of a property is changed. |
ComplexPropertyNullabilityChangedConventions |
Conventions to run when the nullability of a property is changed. |
ComplexPropertyRemovedConventions |
Conventions to run when an entity type is removed. |
ComplexTypeAnnotationChangedConventions |
Conventions to run when an annotation is set or removed on a complex type. |
ComplexTypeMemberIgnoredConventions |
Conventions to run when a property is ignored. |
DiscriminatorPropertySetConventions |
Conventions to run when a discriminator property is set. |
ElementTypeAnnotationChangedConventions |
Conventions to run when an annotation is changed on the element of a collection. |
ElementTypeNullabilityChangedConventions |
Conventions to run when the nullability of the element of a collection is changed. |
EntityTypeAddedConventions |
Conventions to run when an entity type is added to the model. |
EntityTypeAnnotationChangedConventions |
Conventions to run when an annotation is set or removed on an entity type. |
EntityTypeAnnotationSetConventions |
Conventions to run when an annotation is set or removed on an entity type. |
EntityTypeBaseTypeChangedConventions |
Conventions to run when the base entity type is changed. |
EntityTypeIgnoredConventions |
Conventions to run when an entity type is ignored. |
EntityTypeMemberIgnoredConventions |
Conventions to run when a property is ignored. |
EntityTypePrimaryKeyChangedConventions |
Conventions to run when a primary key is changed. |
EntityTypeRemovedConventions |
Conventions to run when an entity type is removed. |
ForeignKeyAddedConventions |
Conventions to run when a foreign key is added. |
ForeignKeyAnnotationChangedConventions |
Conventions to run when an annotation is changed on a foreign key. |
ForeignKeyDependentRequirednessChangedConventions |
Conventions to run when the requiredness of a foreign key is changed. |
ForeignKeyNullNavigationSetConventions |
Conventions to run when a navigation is set to |
ForeignKeyOwnershipChangedConventions |
Conventions to run when the ownership of a foreign key is changed. |
ForeignKeyPrincipalEndChangedConventions |
Conventions to run when the principal end of a relationship is configured. |
ForeignKeyPropertiesChangedConventions |
Conventions to run when the properties or the principal key of a foreign key are changed. |
ForeignKeyRemovedConventions |
Conventions to run when a foreign key is removed. |
ForeignKeyRequirednessChangedConventions |
Conventions to run when the requiredness of a foreign key is changed. |
ForeignKeyUniquenessChangedConventions |
Conventions to run when the uniqueness of a foreign key is changed. |
ForeignKeyUniquenessConventions |
Conventions to run when the uniqueness of a foreign key is changed. |
IndexAddedConventions |
Conventions to run when an index is added. |
IndexAnnotationChangedConventions |
Conventions to run when an annotation is changed on an index. |
IndexRemovedConventions |
Conventions to run when an index is removed. |
IndexSortOrderChangedConventions |
Conventions to run when the sort order of an index is changed. |
IndexUniquenessChangedConventions |
Conventions to run when the uniqueness of an index is changed. |
IndexUniquenessConventions |
Conventions to run when the uniqueness of an index is changed. |
KeyAddedConventions |
Conventions to run when a key is added. |
KeyAnnotationChangedConventions |
Conventions to run when an annotation is changed on a key. |
KeyRemovedConventions |
Conventions to run when a key is removed. |
ModelAnnotationChangedConventions |
Conventions to run when an annotation is set or removed on a model. |
ModelBuiltConventions |
Conventions to run when model building is completed. |
ModelEmbeddedDiscriminatorNameConventions |
Conventions to run when an annotation is set or removed on an entity type. |
ModelFinalizedConventions |
Conventions to run when model validation is completed. |
ModelFinalizingConventions |
Conventions to run when model building is completed. |
ModelInitializedConventions |
Conventions to run to setup the initial model. |
NavigationAddedConventions |
Conventions to run when a navigation property is added. |
NavigationAnnotationChangedConventions |
Conventions to run when an annotation is changed on a navigation property. |
NavigationRemovedConventions |
Conventions to run when a navigation property is removed. |
PrimaryKeyChangedConventions |
Conventions to run when a primary key is changed. |
PrimaryKeySetConventions |
Conventions to run when a primary key is configured. |
PrincipalEndChangedConventions |
Conventions to run when the principal end of a relationship is configured. |
PrincipalEndSetConventions |
Conventions to run when the principal end of a relationship is configured. |
PropertyAddedConventions |
Conventions to run when a property is added. |
PropertyAnnotationChangedConventions |
Conventions to run when an annotation is changed on a property. |
PropertyElementTypeChangedConventions |
Conventions to run when the field of a property is changed. |
PropertyFieldChangedConventions |
Conventions to run when the field of a property is changed. |
PropertyNullabilityChangedConventions |
Conventions to run when the nullability of a property is changed. |
PropertyNullableChangedConventions |
Conventions to run when the nullability of a property is changed. |
PropertyRemovedConventions |
Conventions to run when a property is removed. |
SkipNavigationAddedConventions |
Conventions to run when a skip navigation property is added. |
SkipNavigationAnnotationChangedConventions |
Conventions to run when an annotation is changed on a skip navigation property. |
SkipNavigationForeignKeyChangedConventions |
Conventions to run when a skip navigation foreign key is changed. |
SkipNavigationInverseChangedConventions |
Conventions to run when a skip navigation inverse is changed. |
SkipNavigationRemovedConventions |
Conventions to run when a skip navigation property is removed. |
TriggerAddedConventions |
Conventions to run when a trigger property is added. |
TriggerRemovedConventions |
Conventions to run when a trigger property is removed. |
TypeIgnoredConventions |
Conventions to run when a type is ignored. |
Methods
Add(IConvention) |
Adds a convention to the set. |
AddAfter<TConvention>(IList<TConvention>, TConvention, Type) |
Adds a convention after an existing convention. |
AddAfter<TConvention>(List<TConvention>, TConvention, Type) |
Adds a convention after an existing convention. |
AddBefore<TConvention>(IList<TConvention>, TConvention, Type) |
Adds a convention before an existing convention. |
AddBefore<TConvention>(List<TConvention>, TConvention, Type) |
Adds a convention before an existing convention. |
CreateConventionSet(DbContext) |
Call this method to build a ConventionSet for only core services when using the ModelBuilder outside of OnModelCreating(ModelBuilder). Note that it is unusual to use this method. Consider using DbContext in the normal way instead. |
Remove(Type) |
Removes the convention of the given type. |
Remove<TConvention>(IList<TConvention>, Type) |
Removes an existing convention. |
Remove<TConvention>(List<TConvention>, Type) |
Removes an existing convention. |
Replace<TConvention,TImplementation>(IList<TConvention>, TImplementation) |
Replaces an existing convention with a derived convention. |
Replace<TConvention,TImplementation>(List<TConvention>, TImplementation) |
Replaces an existing convention with a derived convention. |
Replace<TImplementation>(TImplementation) |
Replaces an existing convention with a derived convention. Also registers the new convention for any convention types not implemented by the existing convention. |
Applies to
Entity Framework