EntityTypeBuilder.OwnsMany Method

Definition

Overloads

OwnsMany(Type, String, Action<CollectionOwnershipBuilder>)

Configures a relationship where this entity type provides identity to the other type in the relationship.

OwnsMany(String, Type, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

OwnsMany(Type, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

OwnsMany(String, Type, String)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

OwnsMany(String, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

OwnsMany(String, String, Action<CollectionOwnershipBuilder>)

Configures a relationship where this entity type provides identity to the other type in the relationship.

OwnsMany(Type, String)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

OwnsMany(String, String)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

OwnsMany(Type, String, Action<CollectionOwnershipBuilder>)

Configures a relationship where this entity type provides identity to the other type in the relationship.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder OwnsMany (Type ownedType, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder> buildAction);
abstract member OwnsMany : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.OwnsMany : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function OwnsMany (ownedType As Type, navigationName As String, buildAction As Action(Of CollectionOwnershipBuilder)) As EntityTypeBuilder

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<CollectionOwnershipBuilder>

An action that performs configuration of the owned type and the relationship.

Returns

EntityTypeBuilder

An object that can be used to configure the entity type.

Applies to

OwnsMany(String, Type, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder OwnsMany (string ownedTypeName, Type ownedType, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> buildAction);
abstract member OwnsMany : string * Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.OwnsMany : string * Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function OwnsMany (ownedTypeName As String, ownedType As Type, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder)) As EntityTypeBuilder

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

EntityTypeBuilder

An object that can be used to configure the entity type.

Applies to

OwnsMany(Type, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder OwnsMany (Type ownedType, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> buildAction);
abstract member OwnsMany : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.OwnsMany : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function OwnsMany (ownedType As Type, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder)) As EntityTypeBuilder

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

EntityTypeBuilder

An object that can be used to configure the entity type.

Applies to

OwnsMany(String, Type, String)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder OwnsMany (string ownedTypeName, Type ownedType, string navigationName);
abstract member OwnsMany : string * Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
override this.OwnsMany : string * Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
Public Overridable Function OwnsMany (ownedTypeName As String, ownedType As Type, navigationName As String) As OwnedNavigationBuilder

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.

Returns

OwnedNavigationBuilder

An object that can be used to configure the owned type and the relationship.

Applies to

OwnsMany(String, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder OwnsMany (string ownedTypeName, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> buildAction);
abstract member OwnsMany : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.OwnsMany : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function OwnsMany (ownedTypeName As String, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder)) As EntityTypeBuilder

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

EntityTypeBuilder

An object that can be used to configure the entity type.

Applies to

OwnsMany(String, String, Action<CollectionOwnershipBuilder>)

Configures a relationship where this entity type provides identity to the other type in the relationship.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder OwnsMany (string ownedTypeName, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder> buildAction);
abstract member OwnsMany : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
override this.OwnsMany : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder
Public Overridable Function OwnsMany (ownedTypeName As String, navigationName As String, buildAction As Action(Of CollectionOwnershipBuilder)) As EntityTypeBuilder

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<CollectionOwnershipBuilder>

An action that performs configuration of the owned type and the relationship.

Returns

EntityTypeBuilder

An object that can be used to configure the entity type.

Applies to

OwnsMany(Type, String)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder OwnsMany (Type ownedType, string navigationName);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder OwnsMany (Type ownedType, string navigationName);
abstract member OwnsMany : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder
override this.OwnsMany : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder
abstract member OwnsMany : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
override this.OwnsMany : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
Public Overridable Function OwnsMany (ownedType As Type, navigationName As String) As CollectionOwnershipBuilder
Public Overridable Function OwnsMany (ownedType As Type, navigationName As String) As OwnedNavigationBuilder

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.

Returns

CollectionOwnershipBuilder
OwnedNavigationBuilder

An object that can be used to configure the owned type and the relationship.

Applies to

OwnsMany(String, String)

Configures a relationship where the target entity is owned by (or part of) this entity.

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(String) to fully configure the relationship.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder OwnsMany (string ownedTypeName, string navigationName);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder OwnsMany (string ownedTypeName, string navigationName);
abstract member OwnsMany : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder
override this.OwnsMany : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder
abstract member OwnsMany : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
override this.OwnsMany : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
Public Overridable Function OwnsMany (ownedTypeName As String, navigationName As String) As CollectionOwnershipBuilder
Public Overridable Function OwnsMany (ownedTypeName As String, navigationName As String) As OwnedNavigationBuilder

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

CollectionOwnershipBuilder
OwnedNavigationBuilder

An object that can be used to configure the owned type and the relationship.

Applies to