IConventionForeignKeyBuilder.CanSetForeignKey Method

Definition

Overloads

CanSetForeignKey(IReadOnlyList<IConventionProperty>, Boolean)

Returns a value indicating whether the given properties can be set as the foreign key for this relationship from the current configuration source.

CanSetForeignKey(IReadOnlyList<String>, Boolean)

Returns a value indicating whether the given properties can be set as the foreign key for this relationship from the current configuration source.

CanSetForeignKey(IReadOnlyList<IConventionProperty>, Boolean)

Returns a value indicating whether the given properties can be set as the foreign key for this relationship from the current configuration source.

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

Parameters

properties
IReadOnlyList<IConventionProperty>

The properties to use as the foreign key for this relationship.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the given properties can be set as the foreign key.

Applies to

CanSetForeignKey(IReadOnlyList<String>, Boolean)

Returns a value indicating whether the given properties can be set as the foreign key for this relationship from the current configuration source.

public bool CanSetForeignKey (System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
public bool CanSetForeignKey (System.Collections.Generic.IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false);
abstract member CanSetForeignKey : System.Collections.Generic.IReadOnlyList<string> * bool -> bool
Public Function CanSetForeignKey (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As Boolean

Parameters

propertyNames
IReadOnlyList<String>

The properties to use as the foreign key for this relationship.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the given properties can be set as the foreign key.

Applies to