語言

InversePropertyAttributeConvention 類別

定義

一個根據另一個導航屬性的指定來配置逆向導航性質 InversePropertyAttribute 的約定。

[System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })]
public class InversePropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NavigationAttributeConventionBase<System.ComponentModel.DataAnnotations.Schema.InversePropertyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention
public class InversePropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NavigationAttributeConventionBase<System.ComponentModel.DataAnnotations.Schema.InversePropertyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizedConvention
public class InversePropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NavigationAttributeConventionBase<System.ComponentModel.DataAnnotations.Schema.InversePropertyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention
public class InversePropertyAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.NavigationAttributeConventionBase<System.ComponentModel.DataAnnotations.Schema.InversePropertyAttribute>, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention
[<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>]
type InversePropertyAttributeConvention = class
    inherit NavigationAttributeConventionBase<InversePropertyAttribute>
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeRemovedConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IEntityTypeMemberIgnoredConvention
    interface INavigationAddedConvention
    interface IModelFinalizingConvention
type InversePropertyAttributeConvention = class
    inherit NavigationAttributeConventionBase<InversePropertyAttribute>
    interface IModelFinalizedConvention
    interface IConvention
type InversePropertyAttributeConvention = class
    inherit NavigationAttributeConventionBase<InversePropertyAttribute>
    interface IModelFinalizingConvention
    interface IConvention
type InversePropertyAttributeConvention = class
    inherit NavigationAttributeConventionBase<InversePropertyAttribute>
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeRemovedConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IEntityTypeMemberIgnoredConvention
    interface INavigationAddedConvention
    interface IModelFinalizingConvention
Public Class InversePropertyAttributeConvention
Inherits NavigationAttributeConventionBase(Of InversePropertyAttribute)
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypeMemberIgnoredConvention, IEntityTypeRemovedConvention, IModelFinalizingConvention, INavigationAddedConvention
Public Class InversePropertyAttributeConvention
Inherits NavigationAttributeConventionBase(Of InversePropertyAttribute)
Implements IModelFinalizedConvention
Public Class InversePropertyAttributeConvention
Inherits NavigationAttributeConventionBase(Of InversePropertyAttribute)
Implements IModelFinalizingConvention
繼承
衍生
屬性
實作

備註

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

建構函式

名稱 Description
InversePropertyAttributeConvention(ProviderConventionSetBuilderDependencies)

建立一個新的 實例。InversePropertyAttributeConvention

屬性

名稱 Description
Dependencies

此服務的依賴關係。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)

方法

名稱 Description
IsAmbiguous(IConventionEntityType, MemberInfo, IConventionEntityType)

回傳一個值指示,表示給定導航是否存在與 的歧義逆導航。InversePropertyAttribute

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

在模型中加入實體類型後呼叫。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeAdded(IConventionEntityTypeBuilder, MemberInfo, Type, InversePropertyAttribute, IConventionContext<IConventionEntityTypeBuilder>)

在新增實體類型到模型後,對每個帶有屬性的導航屬性呼叫。

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

在新增實體類型到模型後,對每個帶有屬性的導航屬性呼叫。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, IConventionContext<IConventionEntityType>)

在實體類型的基礎類型變更後呼叫。

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

在實體類型的基礎類型變更後呼叫。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeBaseTypeChanged(IConventionEntityTypeBuilder, IConventionEntityType, IConventionEntityType, MemberInfo, Type, InversePropertyAttribute, IConventionContext<IConventionEntityType>)

在改變實體類型的基礎類型後,對每個帶有屬性的導航屬性呼叫。

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

在改變實體類型的基礎類型後,對每個帶有屬性的導航屬性呼叫。

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

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

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

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

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

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

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, MemberInfo, Type, InversePropertyAttribute, IConventionContext<String>)

在具有屬性的導航屬性後被呼叫,則被忽略。

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

在具有屬性的導航屬性後被呼叫,則被忽略。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

在忽略某個實體類型的成員後被呼叫。

ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

在忽略某個實體類型的成員後被呼叫。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, IConventionContext<IConventionEntityType>)

在移除某個實體類型後才被呼叫。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeRemoved(IConventionModelBuilder, IConventionEntityType, MemberInfo, Type, InversePropertyAttribute, IConventionContext<IConventionEntityType>)

在移除實體類型後,呼叫每個具有屬性的導航屬性。

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

在移除實體類型後,呼叫每個具有屬性的導航屬性。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessEntityTypeRemoved(IConventionModelBuilder, Type, MemberInfo, Type, InversePropertyAttribute, IConventionContext<IConventionEntityType>)

在移除實體類型後,呼叫每個具有屬性的導航屬性。

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

在移除實體類型後,呼叫每個具有屬性的導航屬性。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessForeignKeyPrincipalEndChanged(IConventionForeignKeyBuilder, IConventionContext<IConventionForeignKeyBuilder>)

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

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessForeignKeyPrincipalEndChanged(IConventionForeignKeyBuilder, IEnumerable<TAttribute>, IEnumerable<TAttribute>, IConventionContext<IConventionForeignKeyBuilder>)

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

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessModelFinalized(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

模型最終定案後才會被通知。

ProcessModelFinalizing(IConventionModelBuilder, IConventionContext<IConventionModelBuilder>)

當模型正在定案時會被召喚。

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

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

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

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

ProcessNavigationAdded(IConventionNavigationBuilder, TAttribute, IConventionContext<IConventionNavigationBuilder>)

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

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

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

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, InversePropertyAttribute, IConventionContext<IConventionNavigation>)

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

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

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

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, IConventionContext<IConventionSkipNavigationBuilder>)

在實體類型中加入跳過導覽後呼叫。

(繼承來源 NavigationAttributeConventionBase<TAttribute>)
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>)
TryGetTargetEntityTypeBuilder(IConventionEntityTypeBuilder, Type, MemberInfo, Boolean)

尋找或嘗試為指定導航成員建立實體類型目標。

適用於