IMutableEntityType.SetPrimaryKey Méthode

Définition

Surcharges

SetPrimaryKey(IMutableProperty)

Définit la clé primaire pour ce type d’entité.

SetPrimaryKey(IReadOnlyList<IMutableProperty>)

Définit la clé primaire pour ce type d’entité.

SetPrimaryKey(IMutableProperty)

Définit la clé primaire pour ce type d’entité.

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

Paramètres

property
IMutableProperty

Propriété de clé primaire.

Retours

Clé nouvellement créée.

S’applique à

SetPrimaryKey(IReadOnlyList<IMutableProperty>)

Définit la clé primaire pour ce type d’entité.

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

Paramètres

properties
IReadOnlyList<IMutableProperty>

Propriétés qui composent la clé primaire.

Retours

Clé nouvellement créée.

S’applique à