PropertyExtensions.IsPrimaryKey(IProperty) Methode

Definition

Achtung

Use IReadOnlyProperty.IsPrimaryKey

Ruft einen Wert ab, der angibt, ob diese Eigenschaft als Primärschlüssel (oder Teil eines zusammengesetzten Primärschlüssels) verwendet wird.

C#
public static bool IsPrimaryKey (this Microsoft.EntityFrameworkCore.Metadata.IProperty property);
C#
[System.Obsolete("Use IReadOnlyProperty.IsPrimaryKey")]
public static bool IsPrimaryKey (this Microsoft.EntityFrameworkCore.Metadata.IProperty property);

Parameter

property
IProperty

Die zu überprüfende Eigenschaft.

Gibt zurück

true , wenn die -Eigenschaft als Primärschlüssel verwendet wird, andernfalls false.

Attribute

Gilt für:

Produkt Versionen (Veraltet)
Entity Framework Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0 (6.0)