語言

RequiredNavigationAttributeConvention 類別

定義

若將 應用於導航屬性至主要實體類型時,則配置關係的主要 RequiredAttribute 端。

[System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })]
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
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
[<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>]
type RequiredNavigationAttributeConvention = class
    inherit NavigationAttributeConventionBase<RequiredAttribute>
    interface INavigationAddedConvention
    interface IConvention
    interface ISkipNavigationAddedConvention
    interface IForeignKeyPrincipalEndChangedConvention
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)
Implements IForeignKeyPrincipalEndChangedConvention, INavigationAddedConvention, ISkipNavigationAddedConvention
Public Class RequiredNavigationAttributeConvention
Inherits NavigationAttributeConventionBase(Of RequiredAttribute)
繼承
RequiredNavigationAttributeConvention
屬性
實作

備註

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

建構函式

名稱 Description
RequiredNavigationAttributeConvention(ProviderConventionSetBuilderDependencies)

建立一個新的 實例。RequiredNavigationAttributeConvention

屬性

名稱 Description
Dependencies

此服務的依賴關係。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)

方法

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

在外鍵主端變更後被呼叫。

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

在外鍵主端變更後被呼叫。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

在新增導航到實體類型後呼叫。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionNavigationBuilder, RequiredAttribute, IConventionContext<IConventionNavigationBuilder>)

當帶有屬性的導航屬性被加入實體類型後,會被呼叫。

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>)

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

ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, TAttribute, IConventionContext<IConventionSkipNavigationBuilder>)

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

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessTypeIgnored(IConventionModelBuilder, String, Type, IConventionContext<String>)

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

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessTypeIgnored(IConventionModelBuilder, Type, MemberInfo, Type, TAttribute, IConventionContext<String>)

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

(繼承來源 NavigationAttributeConventionBase<TAttribute>)

適用於