Share via


RequiredNavigationAttributeConvention Class

Definition

A convention that configures the principal side of the relationship as required if the RequiredAttribute is applied on the navigation property to the principal entity type.

public class RequiredNavigationAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NavigationAttributeConventionBase<System.ComponentModel.DataAnnotations.RequiredAttribute>
public class RequiredNavigationAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NavigationAttributeConventionBase<System.ComponentModel.DataAnnotations.RequiredAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPrincipalEndChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationAddedConvention
type RequiredNavigationAttributeConvention = class
    inherit NavigationAttributeConventionBase<RequiredAttribute>
type RequiredNavigationAttributeConvention = class
    inherit NavigationAttributeConventionBase<RequiredAttribute>
    interface INavigationAddedConvention
    interface IConvention
    interface ISkipNavigationAddedConvention
    interface IForeignKeyPrincipalEndChangedConvention
Public Class RequiredNavigationAttributeConvention
Inherits NavigationAttributeConventionBase(Of RequiredAttribute)
Public Class RequiredNavigationAttributeConvention
Inherits NavigationAttributeConventionBase(Of RequiredAttribute)
Implements IForeignKeyPrincipalEndChangedConvention, INavigationAddedConvention, ISkipNavigationAddedConvention
Inheritance
RequiredNavigationAttributeConvention
Implements

Remarks

See Model building conventions for more information and examples.

Constructors

RequiredNavigationAttributeConvention(ProviderConventionSetBuilderDependencies)

Creates a new instance of RequiredNavigationAttributeConvention.

Properties

Dependencies

Dependencies for this service.

(Inherited from NavigationAttributeConventionBase<TAttribute>)

Methods

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

Called after an entity type is added to the model.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityTypeBuilder>)

Called for every navigation property that has an attribute after an entity type is added to the model.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

Called after the base type of an entity type changes.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityType>)

Called for every navigation property that has an attribute after the base type for an entity type is changed.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

Called after an entity type is ignored.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeIgnored(IConventionModelBuilder, Type, MemberInfo, Type, TAttribute, IConventionContext<String>)

Called for every navigation property that has an attribute after an entity type is ignored.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, MemberInfo, Type, TAttribute, IConventionContext<String>)

Called after a navigation property that has an attribute is ignored.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

Called after an entity type member is ignored.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, IConventionContext<IConventionEntityType>)

Called after an entity type is removed from the model.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityType>)

Called for every navigation property that has an attribute after an entity type is removed.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeRemoved(IConventionModelBuilder, Type, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityType>)

Called for every navigation property that has an attribute after an entity type is removed.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessForeignKeyPrincipalEndChanged(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

Called after the principal end of a foreign key is changed.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessForeignKeyPrincipalEndChanged(IConventionForeignKeyBuilder, IEnumerable<RequiredAttribute>, IEnumerable<RequiredAttribute>, IConventionContext<IConventionForeignKeyBuilder>)

Called after the principal end of a foreign key is changed.

ProcessForeignKeyPrincipalEndChanged(IConventionForeignKeyBuilder, IEnumerable<TAttribute>, IEnumerable<TAttribute>, IConventionContext<IConventionForeignKeyBuilder>)

Called after the principal end of a foreign key is changed.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

Called after a navigation is added to the entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionNavigationBuilder, RequiredAttribute, IConventionContext<IConventionNavigationBuilder>)

Called after a navigation property that has an attribute is added to an entity type.

ProcessNavigationAdded(IConventionNavigationBuilder, TAttribute, IConventionContext<IConventionNavigationBuilder>)

Called after a navigation property that has an attribute is added to an entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>)

Called after a navigation is added to the entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, RequiredAttribute, IConventionContext<IConventionNavigation>)

Called after a navigation property that has an attribute is added to an entity type.

ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, TAttribute, IConventionContext<IConventionNavigation>)

Called after a navigation property that has an attribute is added to an entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, IConventionContext<IConventionSkipNavigationBuilder>)

Called after a skip navigation is added to the entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, RequiredAttribute, IConventionContext<IConventionSkipNavigationBuilder>)

Called after a skip navigation property that has an attribute is added to an entity type.

ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, TAttribute, IConventionContext<IConventionSkipNavigationBuilder>)

Called after a skip navigation property that has an attribute is added to an entity type.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

Called after an entity type is ignored.

(Inherited from NavigationAttributeConventionBase<TAttribute>)
ProcessTypeIgnored(IConventionModelBuilder, Type, MemberInfo, Type, TAttribute, IConventionContext<String>)

Called for every navigation property that has an attribute after an entity type is ignored.

(Inherited from NavigationAttributeConventionBase<TAttribute>)

Applies to