OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>.OwnsMany Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
OwnsMany(String, String, Action<OwnedNavigationBuilder>)
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
Configures a relationship where the target entity is owned by (or part of) this entity.
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)
Parameters
- ownedTypeName
- String
The name of the entity type that this relationship targets.
- navigationName
- String
The name of the reference navigation property on this entity type that represents the relationship.
- buildAction
- Action<OwnedNavigationBuilder>
An action that performs configuration of the owned type and the relationship.
Returns
An object that can be used to configure the entity type.
Remarks
The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.
Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.
After calling this method, you should chain a call to WithOwner to fully configure the relationship.
Applies to
OwnsMany(Type, String, Action<OwnedNavigationBuilder>)
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
Configures a relationship where the target entity is owned by (or part of) this entity.
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)
Parameters
- ownedType
- Type
The entity type that this relationship targets.
- navigationName
- String
The name of the reference navigation property on this entity type that represents the relationship.
- buildAction
- Action<OwnedNavigationBuilder>
An action that performs configuration of the owned type and the relationship.
Returns
An object that can be used to configure the entity type.
Remarks
The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.
Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.
After calling this method, you should chain a call to WithOwner to fully configure the relationship.
Applies to
OwnsMany(String, Type, String, Action<OwnedNavigationBuilder>)
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
Configures a relationship where the target entity is owned by (or part of) this entity.
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)
Parameters
- ownedTypeName
- String
The name of the entity type that this relationship targets.
- ownedType
- Type
The CLR type of the entity type that this relationship targets.
- navigationName
- String
The name of the reference navigation property on this entity type that represents the relationship.
- buildAction
- Action<OwnedNavigationBuilder>
An action that performs configuration of the owned type and the relationship.
Returns
An object that can be used to configure the entity type.
Remarks
The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.
Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.
After calling this method, you should chain a call to WithOwner to fully configure the relationship.
Applies to
OwnsMany<TNewDependentEntity>(String, String)
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
Configures a relationship where the target entity is owned by (or part of) this entity.
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)
Type Parameters
- TNewDependentEntity
The entity type that this relationship targets.
Parameters
- ownedTypeName
- String
The name of the entity type that this relationship targets.
- navigationName
- String
The name of the reference navigation property on this entity type that represents the relationship.
Returns
An object that can be used to configure the owned type and the relationship.
Remarks
The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.
Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.
After calling this method, you should chain a call to WithOwner to fully configure the relationship.
Applies to
OwnsMany<TNewDependentEntity>(String, String, Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>)
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
Configures a relationship where the target entity is owned by (or part of) this entity.
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)
Type Parameters
- TNewDependentEntity
The entity type that this relationship targets.
Parameters
- ownedTypeName
- String
The name of the entity type that this relationship targets.
- navigationName
- String
The name of the reference navigation property on this entity type that represents the relationship.
- buildAction
- Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>
An action that performs configuration of the owned type and the relationship.
Returns
An object that can be used to configure the entity type.
Remarks
The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.
Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.
After calling this method, you should chain a call to WithOwner to fully configure the relationship.
Applies to
OwnsMany<TNewDependentEntity>(String, Expression<Func<TDependentEntity, IEnumerable<TNewDependentEntity>>>, Action<OwnedNavigationBuilder<TDependentEntity, TNewDependentEntity>>)
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
Configures a relationship where the target entity is owned by (or part of) this entity.
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)
Type Parameters
- TNewDependentEntity
The entity type that this relationship targets.
Parameters
- ownedTypeName
- String
The name of the entity type that this relationship targets.
- navigationExpression
- Expression<Func<TDependentEntity,IEnumerable<TNewDependentEntity>>>
A lambda expression representing the reference navigation property on this entity type that represents
the relationship (customer => customer.Address
).
- buildAction
- Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>
An action that performs configuration of the owned type and the relationship.
Returns
An object that can be used to configure the entity type.
Remarks
The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.
Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.
After calling this method, you should chain a call to WithOwner to fully configure the relationship.
Applies to
OwnsMany<TNewDependentEntity>(String, Expression<Func<TDependentEntity,IEnumerable<TNewDependentEntity>>>)
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
Configures a relationship where the target entity is owned by (or part of) this entity.
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)
Type Parameters
- TNewDependentEntity
The entity type that this relationship targets.
Parameters
- ownedTypeName
- String
The name of the entity type that this relationship targets.
- navigationExpression
- Expression<Func<TDependentEntity,IEnumerable<TNewDependentEntity>>>
A lambda expression representing the reference navigation property on this entity type that represents
the relationship (customer => customer.Address
).
Returns
An object that can be used to configure the owned type and the relationship.
Remarks
The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.
Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.
After calling this method, you should chain a call to WithOwner to fully configure the relationship.
Applies to
OwnsMany<TNewDependentEntity>(Expression<Func<TDependentEntity,IEnumerable<TNewDependentEntity>>>)
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
Configures a relationship where the target entity is owned by (or part of) this entity.
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)
Type Parameters
- TNewDependentEntity
The entity type that this relationship targets.
Parameters
- navigationExpression
- Expression<Func<TDependentEntity,IEnumerable<TNewDependentEntity>>>
A lambda expression representing the reference navigation property on this entity type that represents
the relationship (customer => customer.Address
).
Returns
An object that can be used to configure the owned type and the relationship.
Remarks
The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.
Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.
After calling this method, you should chain a call to WithOwner to fully configure the relationship.
Applies to
OwnsMany<TNewDependentEntity>(Expression<Func<TDependentEntity, IEnumerable<TNewDependentEntity>>>, Action<OwnedNavigationBuilder<TDependentEntity, TNewDependentEntity>>)
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
Configures a relationship where the target entity is owned by (or part of) this entity.
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)
Type Parameters
- TNewDependentEntity
The entity type that this relationship targets.
Parameters
- navigationExpression
- Expression<Func<TDependentEntity,IEnumerable<TNewDependentEntity>>>
A lambda expression representing the reference navigation property on this entity type that represents
the relationship (customer => customer.Address
).
- buildAction
- Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>
An action that performs configuration of the owned type and the relationship.
Returns
An object that can be used to configure the entity type.
Remarks
The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.
Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.
After calling this method, you should chain a call to WithOwner to fully configure the relationship.
Applies to
OwnsMany<TNewDependentEntity>(String)
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
Configures a relationship where the target entity is owned by (or part of) this entity.
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)
Type Parameters
- TNewDependentEntity
The entity type that this relationship targets.
Parameters
- navigationName
- String
The name of the reference navigation property on this entity type that represents the relationship.
Returns
An object that can be used to configure the owned type and the relationship.
Remarks
The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.
Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.
After calling this method, you should chain a call to WithOwner to fully configure the relationship.
Applies to
OwnsMany<TNewDependentEntity>(String, Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>)
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
- Source:
- OwnedNavigationBuilder%60.cs
Configures a relationship where the target entity is owned by (or part of) this entity.
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)
Type Parameters
- TNewDependentEntity
The entity type that this relationship targets.
Parameters
- navigationName
- String
The name of the reference navigation property on this entity type that represents the relationship.
- buildAction
- Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>
An action that performs configuration of the owned type and the relationship.
Returns
An object that can be used to configure the entity type.
Remarks
The target entity type for each ownership relationship is treated as a different entity type even if the navigation is of the same type. Configuration of the target entity type isn't applied to the target entity type of other ownership relationships.
Most operations on an owned entity require accessing it through the owner entity using the corresponding navigation.
After calling this method, you should chain a call to WithOwner to fully configure the relationship.