IConventionEntityTypeBuilder.CanHaveIndex 方法

定義

傳回值,指出指定屬性上的 和 索引是否可以加入至這個實體類型。

public bool CanHaveIndex (System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
abstract member CanHaveIndex : System.Collections.Generic.IReadOnlyList<string> * bool -> bool
Public Function CanHaveIndex (propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As Boolean

參數

propertyNames
IReadOnlyList<String>

組成索引的屬性名稱。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

true 如果可以加入索引,則為 。

適用於