共用方式為


OwnedNavigationBuilder.OwnsOne Method

Definition

Overloads

OwnsOne(String, Type, String)

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

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

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

OwnsOne(Type, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

OwnsOne(String, String, Action<OwnedNavigationBuilder>)

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

OwnsOne(Type, String)

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

OwnsOne(String, String)

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

OwnsOne(String, Type, String)

Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder OwnsOne (string ownedTypeName, Type ownedType, string navigationName);
abstract member OwnsOne : string * Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
override this.OwnsOne : string * Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
Public Overridable Function OwnsOne (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

An object that can be used to configure 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(String) to fully configure the relationship.

Applies to

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

Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

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

buildAction
Action<OwnedNavigationBuilder>

An action that performs configuration of 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(String) to fully configure the relationship.

Applies to

OwnsOne(Type, String, Action<OwnedNavigationBuilder>)

Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

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

buildAction
Action<OwnedNavigationBuilder>

An action that performs configuration of 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(String) to fully configure the relationship.

Applies to

OwnsOne(String, String, Action<OwnedNavigationBuilder>)

Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

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

buildAction
Action<OwnedNavigationBuilder>

An action that performs configuration of 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(String) to fully configure the relationship.

Applies to

OwnsOne(Type, String)

Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder OwnsOne (Type ownedType, string navigationName);
abstract member OwnsOne : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
override this.OwnsOne : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
Public Overridable Function OwnsOne (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

An object that can be used to configure 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(String) to fully configure the relationship.

Applies to

OwnsOne(String, String)

Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs
Source:
OwnedNavigationBuilder.cs

Configures a relationship where the target entity is owned by (or part of) this entity. The target entity key value is always propagated from the entity it belongs to.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder OwnsOne (string ownedTypeName, string navigationName);
abstract member OwnsOne : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
override this.OwnsOne : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder
Public Overridable Function OwnsOne (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

An object that can be used to configure 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(String) to fully configure the relationship.

Applies to