Partager via


RuntimeEntityType.IReadOnlyEntityType.FindForeignKey Méthode

Définition

Obtient la clé étrangère pour les propriétés données qui pointe vers une clé primaire ou alternative donnée. Retourne null si aucune clé étrangère n’est trouvée.

[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.IReadOnlyForeignKey? IReadOnlyEntityType.FindForeignKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType principalEntityType);
[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.IReadOnlyForeignKey IReadOnlyEntityType.FindForeignKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType principalEntityType);
[<System.Diagnostics.DebuggerStepThrough>]
abstract member Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType.FindForeignKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyForeignKey
override this.Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType.FindForeignKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyForeignKey
Function FindForeignKey (properties As IReadOnlyList(Of IReadOnlyProperty), principalKey As IReadOnlyKey, principalEntityType As IReadOnlyEntityType) As IReadOnlyForeignKey Implements IReadOnlyEntityType.FindForeignKey

Paramètres

properties
IReadOnlyList<IReadOnlyProperty>

Propriétés sur laquelle la clé étrangère est définie.

principalKey
IReadOnlyKey

Clé primaire ou alternative référencée.

principalEntityType
IReadOnlyEntityType

Type d'entité ciblé par la relation. Cela peut être différent du type principalKey défini sur lorsque la relation cible un type dérivé dans une hiérarchie d’héritage (puisque la clé est définie sur le type de base de la hiérarchie).

Retours

Clé étrangère ou null si aucune n’est définie.

Implémente

Attributs

S’applique à