Condividi tramite


RuntimeEntityType.IEntityType.FindForeignKey Metodo

Definizione

Ottiene la chiave esterna per le proprietà indicate che puntano a una determinata chiave primaria o alternativa. Restituisce null se non viene trovata alcuna chiave esterna.

[System.Diagnostics.DebuggerStepThrough]
Microsoft.EntityFrameworkCore.Metadata.IForeignKey? IEntityType.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.IForeignKey IEntityType.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.IEntityType.FindForeignKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.IForeignKey
override this.Microsoft.EntityFrameworkCore.Metadata.IEntityType.FindForeignKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyKey * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.IForeignKey
Function FindForeignKey (properties As IReadOnlyList(Of IReadOnlyProperty), principalKey As IReadOnlyKey, principalEntityType As IReadOnlyEntityType) As IForeignKey Implements IEntityType.FindForeignKey

Parametri

properties
IReadOnlyList<IReadOnlyProperty>

Le proprietà su cui è definita la chiave esterna.

principalKey
IReadOnlyKey

Chiave primaria o alternativa a cui viene fatto riferimento.

principalEntityType
IReadOnlyEntityType

Tipo di entità che rappresenta la destinazione della relazione. Questo può essere diverso dal tipo principalKey definito in quando la relazione è destinata a un tipo derivato in una gerarchia di ereditarietà ( poiché la chiave è definita sul tipo di base della gerarchia).

Restituisce

Chiave esterna o null se nessuna è definita.

Implementazioni

Attributi

Si applica a