Udostępnij za pośrednictwem


IMutableEntityType.SetPrimaryKey Metoda

Definicja

Przeciążenia

SetPrimaryKey(IMutableProperty)

Ustawia klucz podstawowy dla tego typu jednostki.

SetPrimaryKey(IReadOnlyList<IMutableProperty>)

Ustawia klucz podstawowy dla tego typu jednostki.

SetPrimaryKey(IMutableProperty)

Ustawia klucz podstawowy dla tego typu jednostki.

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

Parametry

property
IMutableProperty

Właściwość klucza podstawowego.

Zwraca

Nowo utworzony klucz.

Dotyczy

SetPrimaryKey(IReadOnlyList<IMutableProperty>)

Ustawia klucz podstawowy dla tego typu jednostki.

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

Parametry

properties
IReadOnlyList<IMutableProperty>

Właściwości tworzące klucz podstawowy.

Zwraca

Nowo utworzony klucz.

Dotyczy