Sprache

PropertyExtensions.GetContainingPrimaryKey(IProperty) Methode

Definition

Achtung

Use FindContainingPrimaryKey()

Ruft den Primärschlüssel ab, der diese Eigenschaft verwendet (einschließlich eines zusammengesetzten Primärschlüssels, in dem diese Eigenschaft enthalten ist).

public static Microsoft.EntityFrameworkCore.Metadata.IKey GetContainingPrimaryKey(this Microsoft.EntityFrameworkCore.Metadata.IProperty property);
[System.Obsolete("Use FindContainingPrimaryKey()")]
public static Microsoft.EntityFrameworkCore.Metadata.IKey GetContainingPrimaryKey(this Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member GetContainingPrimaryKey : Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Metadata.IKey
[<System.Obsolete("Use FindContainingPrimaryKey()")>]
static member GetContainingPrimaryKey : Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Metadata.IKey
<Extension()>
Public Function GetContainingPrimaryKey (property As IProperty) As IKey

Parameter

property
IProperty

Die Eigenschaft, für die der Primärschlüssel abgerufen werden soll.

Gibt zurück

Die primäre Eigenschaft, die diese Eigenschaft verwendet, oder null wenn sie nicht Teil des Primärschlüssels ist.

Attribute

Gilt für: