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数据库

适用于