CollectionCollectionBuilder.UsingEntity 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
UsingEntity(String, Type, Func<IMutableEntityType,IMutableForeignKey>, Func<IMutableEntityType,IMutableForeignKey>)
这是一个支持 Entity Framework Core 基础结构的内部 API,不受与公共 API 相同的兼容性标准的约束。 可能会在任何版本中更改或删除它,恕不另行通知。 应仅在代码中直接使用它,并且非常谨慎,并且知道在更新到新的 Entity Framework Core 版本时,这样做可能会导致应用程序失败。
[Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal]
protected virtual Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType UsingEntity (string? joinEntityName, Type? joinEntityType, Func<Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType,Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey>? configureRight, Func<Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType,Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey>? configureLeft);
[<Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal>]
abstract member UsingEntity : string * Type * Func<Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType, Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey> * Func<Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType, Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey> -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
override this.UsingEntity : string * Type * Func<Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType, Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey> * Func<Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType, Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey> -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Protected Overridable Function UsingEntity (joinEntityName As String, joinEntityType As Type, configureRight As Func(Of IMutableEntityType, IMutableForeignKey), configureLeft As Func(Of IMutableEntityType, IMutableForeignKey)) As IMutableEntityType
参数
- joinEntityName
- String
- joinEntityType
- Type
- configureRight
- Func<IMutableEntityType,IMutableForeignKey>
- configureLeft
- Func<IMutableEntityType,IMutableForeignKey>
返回
- 属性
适用于
UsingEntity(String, Type, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Func<EntityTypeBuilder,ReferenceCollectionBuilder>)
配置与参与多对多关系的实体类型的关系。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (string joinEntityName, Type joinEntityType, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureRight, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureLeft);
abstract member UsingEntity : string * Type * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : string * Type * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityName As String, joinEntityType As Type, configureRight As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureLeft As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder)) As EntityTypeBuilder
参数
- joinEntityName
- String
联接实体的名称。
- joinEntityType
- Type
联接实体的 CLR 类型。
- configureRight
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与正确实体类型的关系的配置。
- configureLeft
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与左侧实体类型的关系的配置。
返回
联接实体类型的生成器。
适用于
UsingEntity(String, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Action<EntityTypeBuilder>)
配置与参与多对多关系的实体类型的关系。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (string joinEntityName, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureRight, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureLeft, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> configureJoinEntityType);
abstract member UsingEntity : string * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : string * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityName As String, configureRight As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureLeft As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureJoinEntityType As Action(Of EntityTypeBuilder)) As EntityTypeBuilder
参数
- joinEntityName
- String
联接实体的名称。
- configureRight
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与正确实体类型的关系的配置。
- configureLeft
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与左侧实体类型的关系的配置。
- configureJoinEntityType
- Action<EntityTypeBuilder>
联接实体类型的配置。
返回
原始实体类型的生成器,以便可以链接多个配置调用。
适用于
UsingEntity(Type, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Func<EntityTypeBuilder,ReferenceCollectionBuilder>)
配置与参与多对多关系的实体类型的关系。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (Type joinEntityType, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureRight, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureLeft);
abstract member UsingEntity : Type * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : Type * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityType As Type, configureRight As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureLeft As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder)) As EntityTypeBuilder
参数
- joinEntityType
- Type
联接实体的 CLR 类型。
- configureRight
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与正确实体类型的关系的配置。
- configureLeft
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与左侧实体类型的关系的配置。
返回
联接实体类型的生成器。
适用于
UsingEntity(String, Type, Action<EntityTypeBuilder>)
配置实现多对多关系的联接实体类型。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (string joinEntityName, Type joinEntityType, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> configureJoinEntityType);
abstract member UsingEntity : string * Type * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : string * Type * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityName As String, joinEntityType As Type, configureJoinEntityType As Action(Of EntityTypeBuilder)) As EntityTypeBuilder
参数
- joinEntityName
- String
联接实体的名称。
- joinEntityType
- Type
联接实体的 CLR 类型。
- configureJoinEntityType
- Action<EntityTypeBuilder>
联接实体类型的配置。
返回
原始实体类型的生成器,以便可以链接多个配置调用。
适用于
UsingEntity(String, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Func<EntityTypeBuilder,ReferenceCollectionBuilder>)
配置与参与多对多关系的实体类型的关系。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (string joinEntityName, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureRight, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureLeft);
abstract member UsingEntity : string * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : string * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityName As String, configureRight As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureLeft As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder)) As EntityTypeBuilder
参数
- joinEntityName
- String
联接实体的名称。
- configureRight
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与正确实体类型的关系的配置。
- configureLeft
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与左侧实体类型的关系的配置。
返回
联接实体类型的生成器。
适用于
UsingEntity(Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Action<EntityTypeBuilder>)
配置与参与多对多关系的实体类型的关系。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureRight, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureLeft, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> configureJoinEntityType);
abstract member UsingEntity : Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (configureRight As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureLeft As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureJoinEntityType As Action(Of EntityTypeBuilder)) As EntityTypeBuilder
参数
- configureRight
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与正确实体类型的关系的配置。
- configureLeft
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与左侧实体类型的关系的配置。
- configureJoinEntityType
- Action<EntityTypeBuilder>
联接实体类型的配置。
返回
原始实体类型的生成器,以便可以链接多个配置调用。
适用于
UsingEntity(Type)
配置实现多对多关系的联接实体类型。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (Type joinEntityType);
abstract member UsingEntity : Type -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : Type -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityType As Type) As EntityTypeBuilder
参数
- joinEntityType
- Type
联接实体的 CLR 类型。
返回
联接实体类型的生成器。
适用于
UsingEntity(String, Type)
配置实现多对多关系的联接实体类型。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (string joinEntityName, Type joinEntityType);
abstract member UsingEntity : string * Type -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : string * Type -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityName As String, joinEntityType As Type) As EntityTypeBuilder
参数
- joinEntityName
- String
联接实体的名称。
- joinEntityType
- Type
联接实体的 CLR 类型。
返回
联接实体类型的生成器。
适用于
UsingEntity(String, Action<EntityTypeBuilder>)
配置实现多对多关系的联接实体类型。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (string joinEntityName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> configureJoinEntityType);
abstract member UsingEntity : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityName As String, configureJoinEntityType As Action(Of EntityTypeBuilder)) As EntityTypeBuilder
参数
- joinEntityName
- String
联接实体的名称。
- configureJoinEntityType
- Action<EntityTypeBuilder>
联接实体类型的配置。
返回
原始实体类型的生成器,以便可以链接多个配置调用。
适用于
UsingEntity(Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Func<EntityTypeBuilder,ReferenceCollectionBuilder>)
配置与参与多对多关系的实体类型的关系。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureRight, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureLeft);
abstract member UsingEntity : Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (configureRight As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureLeft As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder)) As EntityTypeBuilder
参数
- configureRight
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与正确实体类型的关系的配置。
- configureLeft
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与左侧实体类型的关系的配置。
返回
联接实体类型的生成器。
适用于
UsingEntity(Type, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Action<EntityTypeBuilder>)
配置与参与多对多关系的实体类型的关系。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (Type joinEntityType, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureRight, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureLeft, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> configureJoinEntityType);
abstract member UsingEntity : Type * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : Type * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityType As Type, configureRight As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureLeft As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureJoinEntityType As Action(Of EntityTypeBuilder)) As EntityTypeBuilder
参数
- joinEntityType
- Type
联接实体的 CLR 类型。
- configureRight
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与正确实体类型的关系的配置。
- configureLeft
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与左侧实体类型的关系的配置。
- configureJoinEntityType
- Action<EntityTypeBuilder>
联接实体类型的配置。
返回
原始实体类型的生成器,以便可以链接多个配置调用。
适用于
UsingEntity(String)
配置实现多对多关系的联接实体类型。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (string joinEntityName);
abstract member UsingEntity : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityName As String) As EntityTypeBuilder
参数
- joinEntityName
- String
联接实体的名称。
返回
联接实体类型的生成器。
适用于
UsingEntity(Action<EntityTypeBuilder>)
配置实现多对多关系的联接实体类型。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> configureJoinEntityType);
abstract member UsingEntity : Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (configureJoinEntityType As Action(Of EntityTypeBuilder)) As EntityTypeBuilder
参数
- configureJoinEntityType
- Action<EntityTypeBuilder>
联接实体类型的配置。
返回
原始实体类型的生成器,以便可以链接多个配置调用。
适用于
UsingEntity(Type, Action<EntityTypeBuilder>)
配置实现多对多关系的联接实体类型。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (Type joinEntityType, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> configureJoinEntityType);
abstract member UsingEntity : Type * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : Type * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityType As Type, configureJoinEntityType As Action(Of EntityTypeBuilder)) As EntityTypeBuilder
参数
- joinEntityType
- Type
联接实体的 CLR 类型。
- configureJoinEntityType
- Action<EntityTypeBuilder>
联接实体类型的配置。
返回
原始实体类型的生成器,以便可以链接多个配置调用。
适用于
UsingEntity(String, Type, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Func<EntityTypeBuilder,ReferenceCollectionBuilder>, Action<EntityTypeBuilder>)
配置与参与多对多关系的实体类型的关系。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder UsingEntity (string joinEntityName, Type joinEntityType, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureRight, Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder,Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> configureLeft, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> configureJoinEntityType);
abstract member UsingEntity : string * Type * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.UsingEntity : string * Type * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Func<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder, Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceCollectionBuilder> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function UsingEntity (joinEntityName As String, joinEntityType As Type, configureRight As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureLeft As Func(Of EntityTypeBuilder, ReferenceCollectionBuilder), configureJoinEntityType As Action(Of EntityTypeBuilder)) As EntityTypeBuilder
参数
- joinEntityName
- String
联接实体的名称。
- joinEntityType
- Type
联接实体的 CLR 类型。
- configureRight
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与正确实体类型的关系的配置。
- configureLeft
- Func<EntityTypeBuilder,ReferenceCollectionBuilder>
与左侧实体类型的关系的配置。
- configureJoinEntityType
- Action<EntityTypeBuilder>
联接实体类型的配置。
返回
原始实体类型的生成器,以便可以链接多个配置调用。