語言

ReferenceOwnershipBuilder.HasIndex(String[]) 方法

定義

在指定屬性上設定索引。 如果在給定屬性集合上存在現有索引,則該現有索引將被回傳用於配置。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder HasIndex(params string[] propertyNames);
abstract member HasIndex : string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
override this.HasIndex : string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
Public Overridable Function HasIndex (ParamArray propertyNames As String()) As IndexBuilder

參數

propertyNames
String[]

組成索引的屬性名稱。

傳回

一個可以用來設定索引的物件。

適用於