RequiredNavigationAttributeConvention 类

定义

一种约定,如果 对主体实体类型应用导航属性,则 RequiredAttribute 根据需要配置关系的主体端。

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
继承
RequiredNavigationAttributeConvention
实现

注解

有关详细信息和示例,请参阅 模型生成约定

构造函数

RequiredNavigationAttributeConvention(ProviderConventionSetBuilderDependencies)

创建 RequiredNavigationAttributeConvention 的新实例。

属性

Dependencies

此服务的依赖项。

(继承自 NavigationAttributeConventionBase<TAttribute>)

方法

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

在实体类型添加到模型后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityTypeBuilder>)

在实体类型添加到模型后,对具有 属性的每个导航属性调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

在实体类型的基类型更改后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityType>)

在实体类型的基类型发生更改后,对具有 属性的每个导航属性调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

在忽略实体类型后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeIgnored(IConventionModelBuilder, Type, MemberInfo, Type, TAttribute, IConventionContext<String>)

对于在实体类型被忽略后具有属性的每个导航属性调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, MemberInfo, Type, TAttribute, IConventionContext<String>)

在忽略具有 特性的导航属性后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

在忽略实体类型成员后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, IConventionContext<IConventionEntityType>)

从模型中删除实体类型后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityType>)

对删除实体类型后具有 属性的每个导航属性调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeRemoved(IConventionModelBuilder, Type, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityType>)

对删除实体类型后具有 属性的每个导航属性调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessForeignKeyPrincipalEndChanged(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

在外键的主体末尾更改后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessForeignKeyPrincipalEndChanged(IConventionForeignKeyBuilder, IEnumerable<RequiredAttribute>, IEnumerable<RequiredAttribute>, IConventionContext<IConventionForeignKeyBuilder>)

一种约定,如果 对主体实体类型应用导航属性,则 RequiredAttribute 根据需要配置关系的主体端。

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

在外键的主体末尾更改后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

在将导航添加到实体类型后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionNavigationBuilder, RequiredAttribute, IConventionContext<IConventionNavigationBuilder>)

一种约定,如果 对主体实体类型应用导航属性,则 RequiredAttribute 根据需要配置关系的主体端。

ProcessNavigationAdded(IConventionNavigationBuilder, TAttribute, IConventionContext<IConventionNavigationBuilder>)

在将具有 属性的导航属性添加到实体类型后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>)

在将导航添加到实体类型后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, RequiredAttribute, IConventionContext<IConventionNavigation>)

在将具有 属性的导航属性添加到实体类型后调用。

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

在将具有 属性的导航属性添加到实体类型后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, IConventionContext<IConventionSkipNavigationBuilder>)

在将跳过导航添加到实体类型后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, RequiredAttribute, IConventionContext<IConventionSkipNavigationBuilder>)

一种约定,如果 对主体实体类型应用导航属性,则 RequiredAttribute 根据需要配置关系的主体端。

ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, TAttribute, IConventionContext<IConventionSkipNavigationBuilder>)

在将具有 特性的 skip 导航属性添加到实体类型后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

在忽略实体类型后调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)
ProcessTypeIgnored(IConventionModelBuilder, Type, MemberInfo, Type, TAttribute, IConventionContext<String>)

对于在实体类型被忽略后具有属性的每个导航属性调用。

(继承自 NavigationAttributeConventionBase<TAttribute>)

适用于