共用方式為


CosmosManyToManyJoinEntityTypeConvention 類別

定義

建立多對多關聯性之聯結實體類型的慣例,並在相關類型共用分割區索引鍵時,將分割區索引鍵加入其中。

public class CosmosManyToManyJoinEntityTypeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ManyToManyJoinEntityTypeConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAnnotationChangedConvention
type CosmosManyToManyJoinEntityTypeConvention = class
    inherit ManyToManyJoinEntityTypeConvention
    interface IEntityTypeAnnotationChangedConvention
    interface IConvention
Public Class CosmosManyToManyJoinEntityTypeConvention
Inherits ManyToManyJoinEntityTypeConvention
Implements IEntityTypeAnnotationChangedConvention
繼承
CosmosManyToManyJoinEntityTypeConvention
實作

備註

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

建構函式

CosmosManyToManyJoinEntityTypeConvention(ProviderConventionSetBuilderDependencies)

建立 CosmosManyToManyJoinEntityTypeConvention 的新執行個體。

屬性

Dependencies

此服務的相依性。

(繼承來源 ManyToManyJoinEntityTypeConvention)

方法

CreateJoinEntityType(String, IConventionSkipNavigation)

建立聯結實體類型,並設定對應的外鍵。

CreateSkipNavigationForeignKey(IConventionSkipNavigation, IConventionEntityTypeBuilder)

在指定的實體類型上建立外鍵,供指定的略過導覽使用。

(繼承來源 ManyToManyJoinEntityTypeConvention)
GenerateJoinTypeName(IConventionSkipNavigation)

為新的聯合實體類型產生唯一的名稱。

(繼承來源 ManyToManyJoinEntityTypeConvention)
ProcessEntityTypeAnnotationChanged(IConventionEntityTypeBuilder, String, IConventionAnnotation, IConventionAnnotation, IConventionContext<IConventionAnnotation>)

在實體類型上變更批註之後呼叫。

ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, IConventionContext<IConventionSkipNavigationBuilder>)

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

(繼承來源 ManyToManyJoinEntityTypeConvention)
ProcessSkipNavigationForeignKeyChanged(IConventionSkipNavigationBuilder, IConventionForeignKey, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

建立多對多關聯性之聯結實體類型的慣例,並在相關類型共用分割區索引鍵時,將分割區索引鍵加入其中。

ProcessSkipNavigationInverseChanged(IConventionSkipNavigationBuilder, IConventionSkipNavigation, IConventionSkipNavigation, IConventionContext<IConventionSkipNavigation>)

在略過巡覽反向變更之後呼叫。

(繼承來源 ManyToManyJoinEntityTypeConvention)
ProcessSkipNavigationRemoved(IConventionEntityTypeBuilder, IConventionSkipNavigation, IConventionContext<IConventionSkipNavigation>)

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

(繼承來源 ManyToManyJoinEntityTypeConvention)
ShouldCreateJoinType(IConventionSkipNavigation)

檢查是否需要新的聯結實體類型。

(繼承來源 ManyToManyJoinEntityTypeConvention)

適用於