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