Share via


OwnedNavigationBuilder.WithOwner(String) Method

Definition

Configures the relationship to the owner.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder WithOwner (string ownerReference = default);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder WithOwner (string? ownerReference = default);
abstract member WithOwner : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder
override this.WithOwner : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnershipBuilder
Public Overridable Function WithOwner (Optional ownerReference As String = Nothing) As OwnershipBuilder

Parameters

ownerReference
String

The name of the reference navigation property pointing to the owner. If null or not specified, there is no navigation property pointing to the owner.

Returns

An object that can be used to configure the relationship.

Remarks

Note that calling this method with no parameters will explicitly configure this side of the relationship to use no navigation property, even if such a property exists on the entity type. If the navigation property is to be used, then it must be specified.

Applies to