SqlServerIndexBuilderExtensions.CanSetIncludeProperties 方法

定義

傳回值,指出是否可以設定指定的 include 屬性。

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 如果可以設定指定的 include 屬性,則為 。

備註

如需詳細資訊和範例,請參閱使用 EF Core建立實體類型和關聯性的模型化,以及使用 EF Core 存取SQL Server和Azure SQL資料庫

適用於