ManyToManyJoinEntityTypeConvention 類別

定義

尋找比對略流覽的慣例,並自動建立具有適當外鍵的多對多聯結實體,將兩個相符的略過流覽設定為使用這些外鍵。

public class ManyToManyJoinEntityTypeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationForeignKeyChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationInverseChangedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.ISkipNavigationRemovedConvention
type ManyToManyJoinEntityTypeConvention = class
    interface ISkipNavigationAddedConvention
    interface IConvention
    interface ISkipNavigationInverseChangedConvention
    interface ISkipNavigationForeignKeyChangedConvention
    interface ISkipNavigationRemovedConvention
Public Class ManyToManyJoinEntityTypeConvention
Implements ISkipNavigationAddedConvention, ISkipNavigationForeignKeyChangedConvention, ISkipNavigationInverseChangedConvention, ISkipNavigationRemovedConvention
繼承
ManyToManyJoinEntityTypeConvention
衍生
實作

備註

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

建構函式

ManyToManyJoinEntityTypeConvention(ProviderConventionSetBuilderDependencies)

建立 ManyToManyJoinEntityTypeConvention 的新執行個體。

屬性

Dependencies

此服務的相依性。

方法

CreateJoinEntityType(String, IConventionSkipNavigation)

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

CreateSkipNavigationForeignKey(IConventionSkipNavigation, IConventionEntityTypeBuilder)

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

GenerateJoinTypeName(IConventionSkipNavigation)

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

ProcessSkipNavigationAdded(IConventionSkipNavigationBuilder, IConventionContext<IConventionSkipNavigationBuilder>)

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

ProcessSkipNavigationForeignKeyChanged(IConventionSkipNavigationBuilder, IConventionForeignKey, IConventionForeignKey, IConventionContext<IConventionForeignKey>)

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

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

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

ProcessSkipNavigationRemoved(IConventionEntityTypeBuilder, IConventionSkipNavigation, IConventionContext<IConventionSkipNavigation>)

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

ShouldCreateJoinType(IConventionSkipNavigation)

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

適用於