IMutableEntityType.SetPrimaryKey Methode

Definition

Überlädt

SetPrimaryKey(IMutableProperty)

Legt den Primärschlüssel für diesen Entitätstyp fest.

SetPrimaryKey(IReadOnlyList<IMutableProperty>)

Legt den Primärschlüssel für diesen Entitätstyp fest.

SetPrimaryKey(IMutableProperty)

Legt den Primärschlüssel für diesen Entitätstyp fest.

public virtual Microsoft.EntityFrameworkCore.Metadata.IMutableKey SetPrimaryKey (Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property);
public virtual Microsoft.EntityFrameworkCore.Metadata.IMutableKey? SetPrimaryKey (Microsoft.EntityFrameworkCore.Metadata.IMutableProperty? property);
abstract member SetPrimaryKey : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
override this.SetPrimaryKey : Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
Public Overridable Function SetPrimaryKey (property As IMutableProperty) As IMutableKey

Parameter

property
IMutableProperty

Die Primärschlüsseleigenschaft.

Gibt zurück

Der neu erstellte Schlüssel.

Gilt für:

SetPrimaryKey(IReadOnlyList<IMutableProperty>)

Legt den Primärschlüssel für diesen Entitätstyp fest.

public Microsoft.EntityFrameworkCore.Metadata.IMutableKey SetPrimaryKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> properties);
public Microsoft.EntityFrameworkCore.Metadata.IMutableKey? SetPrimaryKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty>? properties);
abstract member SetPrimaryKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
Public Function SetPrimaryKey (properties As IReadOnlyList(Of IMutableProperty)) As IMutableKey

Parameter

properties
IReadOnlyList<IMutableProperty>

Die Eigenschaften, aus denen der Primärschlüssel besteht.

Gibt zurück

Der neu erstellte Schlüssel.

Gilt für: