Share via


IConventionRelationshipBuilder.HasPrincipalKey Method

Definition

Overloads

HasPrincipalKey(IReadOnlyList<IConventionProperty>, Boolean)

Configures the properties that this relationship targets.

HasPrincipalKey(IReadOnlyList<String>, Boolean)

Configures the properties that this relationship targets.

HasPrincipalKey(IReadOnlyList<IConventionProperty>, Boolean)

Configures the properties that this relationship targets.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder HasPrincipalKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, bool fromDataAnnotation = false);
abstract member HasPrincipalKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder
Public Function HasPrincipalKey (properties As IReadOnlyList(Of IConventionProperty), Optional fromDataAnnotation As Boolean = false) As IConventionRelationshipBuilder

Parameters

properties
IReadOnlyList<IConventionProperty>

The properties for this relationship to target.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the properties were configured as the target for this relationship, null otherwise.

Applies to

HasPrincipalKey(IReadOnlyList<String>, Boolean)

Configures the properties that this relationship targets.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder HasPrincipalKey (System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
abstract member HasPrincipalKey : System.Collections.Generic.IReadOnlyList<string> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionRelationshipBuilder
Public Function HasPrincipalKey (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As IConventionRelationshipBuilder

Parameters

propertyNames
IReadOnlyList<String>

The properties for this relationship to target.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the properties were configured as the target for this relationship, null otherwise.

Applies to