IConventionRelationshipBuilder.IsOwnership 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.
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
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
Entity Framework