語言

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>
衍生
屬性
實作

備註

更多資訊與範例請參閱 模型建構慣例 。

建構函式

名稱 Description
NavigationAttributeConventionBase<TAttribute>(ProviderConventionSetBuilderDependencies)

建立一個新的 實例。NavigationAttributeConventionBase<TAttribute>

屬性

名稱 Description
Dependencies

此服務的依賴關係。

方法

名稱 Description
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>)

在一個帶有屬性的 Skip Navigation 屬性加入實體類型後呼叫。

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

在忽略某個實體類型後呼叫。

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

在忽略某個實體類型後,每個具有屬性的導航屬性都會被呼叫。

適用於