共用方式為


RelationshipDiscoveryConvention 類別

定義

根據導覽屬性設定實體類型之間關聯性的慣例,只要沒有模棱兩可的對應反向導覽。

public class RelationshipDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationRemovedConvention
public class RelationshipDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyNullNavigationSetConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationRemovedConvention
public class RelationshipDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeBaseTypeChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeMemberIgnoredConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyNullNavigationSetConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyOwnershipChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IForeignKeyRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.INavigationRemovedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ITypeIgnoredConvention
type RelationshipDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeIgnoredConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface INavigationRemovedConvention
    interface IEntityTypeMemberIgnoredConvention
    interface INavigationAddedConvention
    interface IForeignKeyOwnershipChangedConvention
type RelationshipDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeIgnoredConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IEntityTypeMemberIgnoredConvention
    interface INavigationRemovedConvention
    interface INavigationAddedConvention
    interface IForeignKeyOwnershipChangedConvention
type RelationshipDiscoveryConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IEntityTypeIgnoredConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IEntityTypeMemberIgnoredConvention
    interface INavigationRemovedConvention
    interface INavigationAddedConvention
    interface IForeignKeyOwnershipChangedConvention
    interface IForeignKeyNullNavigationSetConvention
    interface IForeignKeyRemovedConvention
type RelationshipDiscoveryConvention = class
    interface ITypeIgnoredConvention
    interface IConvention
    interface IEntityTypeAddedConvention
    interface IEntityTypeBaseTypeChangedConvention
    interface IEntityTypeMemberIgnoredConvention
    interface INavigationRemovedConvention
    interface INavigationAddedConvention
    interface IForeignKeyOwnershipChangedConvention
    interface IForeignKeyNullNavigationSetConvention
    interface IForeignKeyRemovedConvention
Public Class RelationshipDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypeIgnoredConvention, IEntityTypeMemberIgnoredConvention, IForeignKeyOwnershipChangedConvention, INavigationAddedConvention, INavigationRemovedConvention
Public Class RelationshipDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypeIgnoredConvention, IEntityTypeMemberIgnoredConvention, IForeignKeyNullNavigationSetConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyRemovedConvention, INavigationAddedConvention, INavigationRemovedConvention
Public Class RelationshipDiscoveryConvention
Implements IEntityTypeAddedConvention, IEntityTypeBaseTypeChangedConvention, IEntityTypeMemberIgnoredConvention, IForeignKeyNullNavigationSetConvention, IForeignKeyOwnershipChangedConvention, IForeignKeyRemovedConvention, INavigationAddedConvention, INavigationRemovedConvention, ITypeIgnoredConvention
繼承
RelationshipDiscoveryConvention
衍生
實作

備註

如需詳細資訊和範例,請參閱 模型建置慣例

建構函式

RelationshipDiscoveryConvention(ProviderConventionSetBuilderDependencies)

建立 RelationshipDiscoveryConvention 的新執行個體。

屬性

Dependencies

此服務的相依性。

方法

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

在實體類型新增至模型之後呼叫。

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

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

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

忽略實體類型之後呼叫。

ProcessEntityTypeMemberIgnored(IConventionEntityTypeBuilder, String, IConventionContext<String>)

忽略實體類型成員之後呼叫。

ProcessForeignKeyNullNavigationSet(IConventionForeignKeyBuilder, Boolean, IConventionContext<IConventionNavigation>)

在外鍵上將導覽設定為 null 之後呼叫。

ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

在外鍵的擁有權值變更之後呼叫。

ProcessForeignKeyOwnershipChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

在外鍵的擁有權值變更之後呼叫。

ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

移除外鍵之後呼叫。

ProcessNavigationAdded(IConventionNavigationBuilder, IConventionContext<IConventionNavigationBuilder>)

在導覽新增至實體類型之後呼叫。

ProcessNavigationAdded(IConventionRelationshipBuilder, IConventionNavigation, IConventionContext<IConventionNavigation>)

在導覽新增至實體類型之後呼叫。

ProcessNavigationRemoved(IConventionEntityTypeBuilder, IConventionEntityTypeBuilder, String, MemberInfo, IConventionContext<String>)

從實體類型中移除導覽之後呼叫。

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

忽略實體類型之後呼叫。

ShouldBeOwned(Type, IConventionModel)

傳回值,指出如果指定的實體類型目前不在模型中,是否應該新增為擁有。

TryGetTargetEntityTypeBuilder(IConventionEntityTypeBuilder, Type, MemberInfo, Nullable<Boolean>, Boolean)

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

適用於