语言

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 访问SQL Server和Azure SQL数据库。

适用于