Compartilhar via


RuntimeEntityType.IReadOnlyEntityType.FindForeignKey Método

Definição

Obtém a chave estrangeira para as propriedades fornecidas que apontam para uma determinada chave primária ou alternativa. Retorna null se nenhuma chave estrangeira for encontrada.

[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

Parâmetros

properties
IReadOnlyList<IReadOnlyProperty>

As propriedades nas quais a chave estrangeira é definida.

principalKey
IReadOnlyKey

A chave primária ou alternativa referenciada.

principalEntityType
IReadOnlyEntityType

O tipo de entidade que a relação tem como destino. Isso pode ser diferente do tipo definido em quando a relação é direcionada a um tipo derivado em uma hierarquia de herança (uma vez que principalKey a chave é definida no tipo base da hierarquia).

Retornos

A chave estrangeira ou null se nenhuma for definida.

Implementações

Atributos

Aplica-se a