CosmosRelationshipDiscoveryConvention 類別

定義

根據導覽屬性設定實體類型之間關聯性的慣例,只要沒有模棱兩可的對應反向導覽。 所有導覽都假設是以 Cosmos 擁有的實體類型為目標。

public class CosmosRelationshipDiscoveryConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.RelationshipDiscoveryConvention
type CosmosRelationshipDiscoveryConvention = class
    inherit RelationshipDiscoveryConvention
Public Class CosmosRelationshipDiscoveryConvention
Inherits RelationshipDiscoveryConvention
繼承
CosmosRelationshipDiscoveryConvention

備註

如需詳細資訊和範例,請參閱 模型建置慣例使用 EF Core 存取 Azure Cosmos DB

建構函式

CosmosRelationshipDiscoveryConvention(ProviderConventionSetBuilderDependencies)

建立 RelationshipDiscoveryConvention 的新執行個體。

屬性

Dependencies

此服務的相依性。

(繼承來源 RelationshipDiscoveryConvention)

方法

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

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

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

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

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

忽略實體類型之後呼叫。

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

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

(繼承來源 RelationshipDiscoveryConvention)
ProcessForeignKeyNullNavigationSet(IConventionForeignKeyBuilder, Boolean, IConventionContext<IConventionNavigation>)

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

(繼承來源 RelationshipDiscoveryConvention)
ProcessForeignKeyOwnershipChanged(IConventionForeignKeyBuilder, IConventionContext<Nullable<Boolean>>)

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

(繼承來源 RelationshipDiscoveryConvention)
ProcessForeignKeyOwnershipChanged(IConventionRelationshipBuilder, IConventionContext<IConventionRelationshipBuilder>)

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

(繼承來源 RelationshipDiscoveryConvention)
ProcessForeignKeyRemoved(IConventionEntityTypeBuilder, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

移除外鍵之後呼叫。

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

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

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

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

(繼承來源 RelationshipDiscoveryConvention)
ProcessNavigationRemoved(IConventionEntityTypeBuilder, IConventionEntityTypeBuilder, String, MemberInfo, IConventionContext<String>)

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

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

忽略實體類型之後呼叫。

(繼承來源 RelationshipDiscoveryConvention)
ShouldBeOwned(Type, IConventionModel)

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

ShouldBeOwnedType(Type, IConventionModel)

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

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

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

(繼承來源 RelationshipDiscoveryConvention)

適用於