Partager via


IConventionForeignKeyBuilder.HasForeignKey Méthode

Définition

Surcharges

HasForeignKey(IReadOnlyList<IConventionProperty>, Boolean)

Configure les propriétés à utiliser comme clé étrangère pour cette relation.

HasForeignKey(IReadOnlyList<String>, Boolean)

Configure les propriétés à utiliser comme clé étrangère pour cette relation.

HasForeignKey(IReadOnlyList<IConventionProperty>, Boolean)

Configure les propriétés à utiliser comme clé étrangère pour cette relation.

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

Paramètres

properties
IReadOnlyList<IConventionProperty>

Propriétés à utiliser comme clé étrangère pour cette relation.

fromDataAnnotation
Boolean

Indique si la configuration a été spécifiée à l’aide d’une annotation de données.

Retours

Le même générateur instance si les propriétés ont été configurées en tant que clé étrangère, null sinon.

S’applique à

HasForeignKey(IReadOnlyList<String>, Boolean)

Configure les propriétés à utiliser comme clé étrangère pour cette relation.

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

Paramètres

propertyNames
IReadOnlyList<String>

Propriétés à utiliser comme clé étrangère pour cette relation.

fromDataAnnotation
Boolean

Indique si la configuration a été spécifiée à l’aide d’une annotation de données.

Retours

Le même générateur instance si les propriétés ont été configurées en tant que clé étrangère, null sinon.

S’applique à