Bagikan melalui


RuntimeEntityType.AddIndex Metode

Definisi

Menambahkan indeks ke jenis entitas ini.

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

Parameter

properties
IReadOnlyList<RuntimeProperty>

Properti yang akan diindeks.

name
String

Nama indeks.

unique
Boolean

Nilai yang menunjukkan apakah nilai yang ditetapkan ke properti terindeks unik.

Mengembalikan

Indeks yang baru dibuat.

Berlaku untuk