IConventionRelationshipBuilder.IsOwnership Method

Definition

Configures whether this relationship defines an ownership (i.e. whether the dependent entity must always be accessed via the navigation from the principal entity).

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder IsOwnership (bool? ownership, bool fromDataAnnotation = false);
abstract member IsOwnership : Nullable<bool> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder
Public Function IsOwnership (ownership As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false) As IConventionRelationshipBuilder

Parameters

ownership
Nullable<Boolean>

A value indicating whether this relationship defines an ownership. null to reset to default.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the ownership was configured, null otherwise.

Applies to