IMutableEntityType.SetPrimaryKey Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
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
Colaborar conosco no GitHub
A fonte deste conteúdo pode ser encontrada no GitHub, onde você também pode criar e revisar problemas e solicitações de pull. Para obter mais informações, confira o nosso guia para colaboradores.
Entity Framework