SqlServerIndexBuilderExtensions.ForSqlServerInclude 方法

定义

重载

ForSqlServerInclude(IndexBuilder, String[])
已过时.

以SQL Server为目标时配置索引包括属性。

ForSqlServerInclude(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)
已过时.

以SQL Server为目标时配置索引包括属性。

ForSqlServerInclude<TEntity>(IndexBuilder<TEntity>, Expression<Func<TEntity,Object>>)
已过时.

以SQL Server为目标时配置索引包括属性。

ForSqlServerInclude(IndexBuilder, String[])

Source:
SqlServerIndexBuilderExtensions.cs
Source:
SqlServerIndexBuilderExtensions.cs
Source:
SqlServerIndexBuilderExtensions.cs

注意

Use IncludeProperties

以SQL Server为目标时配置索引包括属性。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder ForSqlServerInclude (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, params string[] propertyNames);
[System.Obsolete("Use IncludeProperties")]
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder ForSqlServerInclude (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, params string[] propertyNames);
static member ForSqlServerInclude : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder * string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
[<System.Obsolete("Use IncludeProperties")>]
static member ForSqlServerInclude : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder * string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
<Extension()>
Public Function ForSqlServerInclude (indexBuilder As IndexBuilder, ParamArray propertyNames As String()) As IndexBuilder

参数

indexBuilder
IndexBuilder

要配置的索引的生成器。

propertyNames
String[]

要用于“include”子句的属性名称数组。

返回

用于进一步配置索引的生成器。

属性

适用于

ForSqlServerInclude(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)

Source:
SqlServerIndexBuilderExtensions.cs
Source:
SqlServerIndexBuilderExtensions.cs

注意

Use IncludeProperties

以SQL Server为目标时配置索引包括属性。

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

参数

indexBuilder
IConventionIndexBuilder

要配置的索引的生成器。

propertyNames
IReadOnlyList<String>

要用于“include”子句的属性名称数组。

fromDataAnnotation
Boolean

指示配置是否是使用数据注释指定的。

返回

如果应用了配置,则为同一生成器实例, null 否则为 。

属性

适用于

ForSqlServerInclude<TEntity>(IndexBuilder<TEntity>, Expression<Func<TEntity,Object>>)

Source:
SqlServerIndexBuilderExtensions.cs
Source:
SqlServerIndexBuilderExtensions.cs
Source:
SqlServerIndexBuilderExtensions.cs

注意

Use IncludeProperties

以SQL Server为目标时配置索引包括属性。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> ForSqlServerInclude<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, System.Linq.Expressions.Expression<Func<TEntity,object>> includeExpression);
[System.Obsolete("Use IncludeProperties")]
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> ForSqlServerInclude<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, System.Linq.Expressions.Expression<Func<TEntity,object>> includeExpression);
static member ForSqlServerInclude : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * System.Linq.Expressions.Expression<Func<'Entity, obj>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
[<System.Obsolete("Use IncludeProperties")>]
static member ForSqlServerInclude : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * System.Linq.Expressions.Expression<Func<'Entity, obj>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
<Extension()>
Public Function ForSqlServerInclude(Of TEntity) (indexBuilder As IndexBuilder(Of TEntity), includeExpression As Expression(Of Func(Of TEntity, Object))) As IndexBuilder(Of TEntity)

类型参数

TEntity

参数

indexBuilder
IndexBuilder<TEntity>

要配置的索引的生成器。

includeExpression
Expression<Func<TEntity,Object>>

一个 lambda 表达式,表示要包含在) (“include”子句中的属性 (blog => blog.Url) 。

如果要包含多个属性,请指定一个匿名类型,包括) (post => new { post.Title, post.BlogId } 属性。

返回

IndexBuilder<TEntity>

用于进一步配置索引的生成器。

属性

适用于