语言

NavigationAttributeConventionBase<TAttribute> 类

定义

基于应用于导航的属性执行配置的约定的基类型。

[System.Runtime.CompilerServices.Nullable(0)]
public abstract class NavigationAttributeConventionBase<TAttribute> where TAttribute : Attribute
public abstract class NavigationAttributeConventionBase<TAttribute> : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention where TAttribute : Attribute
public abstract class NavigationAttributeConventionBase<TAttribute> : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyPrincipalEndChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationAddedConvention where TAttribute : Attribute
public abstract class NavigationAttributeConventionBase<TAttribute> where TAttribute : Attribute
[<System.Runtime.CompilerServices.Nullable(0)>]
type NavigationAttributeConventionBase<'Attribute (requires 'Attribute :> Attribute)> = class
type NavigationAttributeConventionBase<'Attribute (requires 'Attribute :> Attribute)> = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeIgnoredConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface INavigationAddedConvention
    interface IEntityTypeMemberIgnoredConvention
type NavigationAttributeConventionBase<'Attribute (requires 'Attribute :> Attribute)> = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeIgnoredConvention
    interface IEntityTypeRemovedConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IEntityTypeMemberIgnoredConvention
    interface INavigationAddedConvention
    interface ISkipNavigationAddedConvention
    interface IForeignKeyPrincipalEndChangedConvention
type NavigationAttributeConventionBase<'Attribute (requires 'Attribute :> Attribute)> = class
Public MustInherit Class NavigationAttributeConventionBase(Of TAttribute)
Public MustInherit Class NavigationAttributeConventionBase(Of TAttribute)
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypeIgnoredConvention, IEntityTypeMemberIgnoredConvention, INavigationAddedConvention
Public MustInherit Class NavigationAttributeConventionBase(Of TAttribute)
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypeIgnoredConvention, IEntityTypeMemberIgnoredConvention, IEntityTypeRemovedConvention, IForeignKeyPrincipalEndChangedConvention, INavigationAddedConvention, ISkipNavigationAddedConvention

类型参数

TAttribute

要查找的属性类型。

继承
NavigationAttributeConventionBase<TAttribute>
派生
特性
实现

注解

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

构造函数

名称 说明
NavigationAttributeConventionBase<TAttribute>(ProviderConventionSetBuilderDependencies)

创建 NavigationAttributeConventionBase<TAttribute>的新实例。

属性

名称 说明
Dependencies

此服务的依赖项。

方法

名称 说明
GetAttributes<TCustomAttribute>(IConventionEntityType, IConventionNavigation)

返回应用于给定导航的属性。

GetAttributes<TCustomAttribute>(IConventionEntityType, IConventionSkipNavigation)

返回应用于给定跳过导航的属性。

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

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

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, MemberInfo, Type, TAttribute, IConventionContext<IConventionEntityTypeBuilder>)

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

ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

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

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

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

ProcessEntityTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

在忽略实体类型后调用。

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

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

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

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

ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

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

ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, IConventionContext<IConventionEntityType>)

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

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

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

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

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

ProcessForeignKeyPrincipalEndChanged(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

在外键的主体结束更改后调用。

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

在外键的主体结束更改后调用。

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

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

ProcessNavigationAdded(IConventionNavigationBuilder, TAttribute, IConventionContext<IConventionNavigationBuilder>)

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

ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>)

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

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

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

ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, IConventionContext<IConventionSkipNavigationBuilder>)

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

ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, TAttribute, IConventionContext<IConventionSkipNavigationBuilder>)

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

ProcessTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

在忽略实体类型后调用。

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

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

适用于