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)

检查是否需要新的联接实体类型。

适用于