語言

SqlServerIndexBuilderExtensions.CanSetIncludeProperties 方法

定義

回傳一個值,表示是否能設定給定的包含屬性。

public static bool CanSetIncludeProperties(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, System.Collections.Generic.IReadOnlyList<string>? propertyNames, bool fromDataAnnotation = false);
public static bool CanSetIncludeProperties(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, System.Collections.Generic.IReadOnlyList<string> propertyNames, bool fromDataAnnotation = false);
static member CanSetIncludeProperties : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder * System.Collections.Generic.IReadOnlyList<string> * bool -> bool
<Extension()>
Public Function CanSetIncludeProperties (indexBuilder As IConventionIndexBuilder, propertyNames As IReadOnlyList(Of String), Optional fromDataAnnotation As Boolean = false) As Boolean

參數

indexBuilder
IConventionIndexBuilder

正在設定索引的建置者。

propertyNames
IReadOnlyList<String>

一組屬性名稱的陣列,用於「include」子句。

fromDataAnnotation
Boolean

表示配置是否以資料註解方式指定。

傳回

true 若給定包含屬性,則可設定。

備註

更多資訊與範例請參閱「建模實體類型與關係」,以及「使用 EF Core 存取 SQL Server 與 Azure SQL 資料庫」。

適用於