RuntimeEntityType.IEntityType.FindForeignKey Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
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.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
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
Entity Framework