ReferenceOwnershipBuilder<TEntity,TRelatedEntity>.OwnsMany 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| OwnsMany<TDependentEntity>(Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>) |
配置一个关系,其中目标实体由此实体(或部分)拥有。 即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。 拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。 |
| OwnsMany<TDependentEntity>(String) |
配置一个关系,其中目标实体由此实体(或部分)拥有。 即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。 拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。 |
| OwnsMany<TDependentEntity>(Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>, Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>) |
配置一个关系,其中目标实体由此实体(或部分)拥有。 即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。 拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。 |
| OwnsMany<TDependentEntity>(String, Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>) |
配置一个关系,其中目标实体由此实体(或部分)拥有。 即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。 拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。 |
OwnsMany<TDependentEntity>(Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>)
配置一个关系,其中目标实体由此实体(或部分)拥有。
即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。
拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity> OwnsMany<TDependentEntity>(System.Linq.Expressions.Expression<Func<TRelatedEntity,System.Collections.Generic.IEnumerable<TDependentEntity>>> navigationExpression) where TDependentEntity : class;
override this.OwnsMany : System.Linq.Expressions.Expression<Func<'RelatedEntity, seq<'DependentEntity>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'RelatedEntity, 'DependentEntity (requires 'RelatedEntity : null and 'DependentEntity : null)> (requires 'DependentEntity : null)
Public Overridable Function OwnsMany(Of TDependentEntity As Class) (navigationExpression As Expression(Of Func(Of TRelatedEntity, IEnumerable(Of TDependentEntity)))) As CollectionOwnershipBuilder(Of TRelatedEntity, TDependentEntity)
类型参数
- TDependentEntity
此关系面向的实体类型。
参数
- navigationExpression
- Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>
一个 lambda 表达式,表示此实体类型的引用导航属性,该属性表示关系(customer => customer.Address)。
返回
可用于配置自有类型和关系的对象。
适用于
OwnsMany<TDependentEntity>(String)
配置一个关系,其中目标实体由此实体(或部分)拥有。
即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。
拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity> OwnsMany<TDependentEntity>(string navigationName) where TDependentEntity : class;
override this.OwnsMany : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'RelatedEntity, 'DependentEntity (requires 'RelatedEntity : null and 'DependentEntity : null)> (requires 'DependentEntity : null)
Public Overridable Function OwnsMany(Of TDependentEntity As Class) (navigationName As String) As CollectionOwnershipBuilder(Of TRelatedEntity, TDependentEntity)
类型参数
- TDependentEntity
此关系面向的实体类型。
参数
- navigationName
- String
表示关系的此实体类型的引用导航属性的名称。
返回
可用于配置自有类型和关系的对象。
适用于
OwnsMany<TDependentEntity>(Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>, Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>)
配置一个关系,其中目标实体由此实体(或部分)拥有。
即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。
拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<TEntity,TRelatedEntity> OwnsMany<TDependentEntity>(System.Linq.Expressions.Expression<Func<TRelatedEntity,System.Collections.Generic.IEnumerable<TDependentEntity>>> navigationExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>> buildAction) where TDependentEntity : class;
override this.OwnsMany : System.Linq.Expressions.Expression<Func<'RelatedEntity, seq<'DependentEntity>>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'RelatedEntity, 'DependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'DependentEntity : null)
Public Overridable Function OwnsMany(Of TDependentEntity As Class) (navigationExpression As Expression(Of Func(Of TRelatedEntity, IEnumerable(Of TDependentEntity))), buildAction As Action(Of CollectionOwnershipBuilder(Of TRelatedEntity, TDependentEntity))) As ReferenceOwnershipBuilder(Of TEntity, TRelatedEntity)
类型参数
- TDependentEntity
此关系面向的实体类型。
参数
- navigationExpression
- Expression<Func<TRelatedEntity,IEnumerable<TDependentEntity>>>
一个 lambda 表达式,表示此实体类型的引用导航属性,该属性表示关系(customer => customer.Address)。
- buildAction
- Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>
执行自有类型和关系的配置的操作。
返回
可用于配置实体类型的对象。
适用于
OwnsMany<TDependentEntity>(String, Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>)
配置一个关系,其中目标实体由此实体(或部分)拥有。
即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。
拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<TEntity,TRelatedEntity> OwnsMany<TDependentEntity>(string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>> buildAction) where TDependentEntity : class;
override this.OwnsMany : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'RelatedEntity, 'DependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'DependentEntity : null)
Public Overridable Function OwnsMany(Of TDependentEntity As Class) (navigationName As String, buildAction As Action(Of CollectionOwnershipBuilder(Of TRelatedEntity, TDependentEntity))) As ReferenceOwnershipBuilder(Of TEntity, TRelatedEntity)
类型参数
- TDependentEntity
此关系面向的实体类型。
参数
- navigationName
- String
表示关系的此实体类型的引用导航属性的名称。
- buildAction
- Action<CollectionOwnershipBuilder<TRelatedEntity,TDependentEntity>>
执行自有类型和关系的配置的操作。
返回
可用于配置实体类型的对象。