Share via


IMutableEntityType.SetPrimaryKey Método

Definição

Sobrecargas

SetPrimaryKey(IMutableProperty)

Define a chave primária para esse tipo de entidade.

SetPrimaryKey(IReadOnlyList<IMutableProperty>)

Define a chave primária para esse tipo de entidade.

SetPrimaryKey(IMutableProperty)

Define a chave primária para esse tipo de entidade.

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

Parâmetros

property
IMutableProperty

A propriedade de chave primária.

Retornos

A chave recém-criada.

Aplica-se a

SetPrimaryKey(IReadOnlyList<IMutableProperty>)

Define a chave primária para esse tipo de entidade.

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

Parâmetros

properties
IReadOnlyList<IMutableProperty>

As propriedades que compõem a chave primária.

Retornos

A chave recém-criada.

Aplica-se a