Sdílet prostřednictvím


MutableEntityTypeExtensions.FindKey(IMutableEntityType, IProperty) Metoda

Definice

Získá primární nebo alternativní klíč, který je definován v dané vlastnosti. Vrátí, null pokud není pro danou vlastnost definován žádný klíč.

public static Microsoft.EntityFrameworkCore.Metadata.IMutableKey FindKey (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member FindKey : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
<Extension()>
Public Function FindKey (entityType As IMutableEntityType, property As IProperty) As IMutableKey

Parametry

entityType
IMutableEntityType

Typ entity.

property
IProperty

Vlastnost, pro kterou je klíč definován.

Návraty

Klíč nebo null, pokud není definován žádný.

Platí pro