Compartilhar via


RuntimeEntityType.AddIndex Método

Definição

Adiciona um índice a esse tipo de entidade.

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeIndex AddIndex (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.RuntimeProperty> properties, string? name = default, bool unique = false);
abstract member AddIndex : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.RuntimeProperty> * string * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeIndex
override this.AddIndex : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.RuntimeProperty> * string * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeIndex
Public Overridable Function AddIndex (properties As IReadOnlyList(Of RuntimeProperty), Optional name As String = Nothing, Optional unique As Boolean = false) As RuntimeIndex

Parâmetros

properties
IReadOnlyList<RuntimeProperty>

As propriedades que devem ser indexadas.

name
String

O nome do índice.

unique
Boolean

Um valor que indica se os valores atribuídos às propriedades indexadas são exclusivos.

Retornos

O índice recém-criado.

Aplica-se a