IConventionForeignKeyBuilder.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.IConventionForeignKeyBuilder 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.IConventionForeignKeyBuilder
Public Function HasPrincipalKey (properties As IReadOnlyList(Of IConventionProperty), Optional fromDataAnnotation As Boolean = false) As IConventionForeignKeyBuilder

Parameters

properties
IReadOnlyList<IConventionProperty>

The properties for this relationship to target.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

IConventionForeignKeyBuilder

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

Parameters

propertyNames
IReadOnlyList<String>

The properties for this relationship to target.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

IConventionForeignKeyBuilder

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

Applies to