SqlServerIndexBuilderExtensions.IncludeProperties 方法

定义

重载

IncludeProperties(IndexBuilder, String[])

在面向SQL Server时配置索引包括属性。

IncludeProperties(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)

在面向SQL Server时配置索引包括属性。

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

在面向SQL Server时配置索引包括属性。

IncludeProperties<TEntity>(IndexBuilder<TEntity>, String[])

在面向SQL Server时配置索引包括属性。

IncludeProperties(IndexBuilder, String[])

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

在面向SQL Server时配置索引包括属性。

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

参数

indexBuilder
IndexBuilder

要配置的索引的生成器。

propertyNames
String[]

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

返回

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

注解

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问SQL Server和Azure SQL数据库

适用于

IncludeProperties(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)

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

在面向SQL Server时配置索引包括属性。

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

参数

indexBuilder
IConventionIndexBuilder

要配置的索引的生成器。

propertyNames
IReadOnlyList<String>

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

fromDataAnnotation
Boolean

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

返回

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

注解

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问SQL Server和Azure SQL数据库

适用于

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

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

在面向SQL Server时配置索引包括属性。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> IncludeProperties<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, System.Linq.Expressions.Expression<Func<TEntity,object>> includeExpression);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> IncludeProperties<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, System.Linq.Expressions.Expression<Func<TEntity,object?>> includeExpression);
static member IncludeProperties : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * System.Linq.Expressions.Expression<Func<'Entity, obj>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
<Extension()>
Public Function IncludeProperties(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>

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

注解

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问SQL Server和Azure SQL数据库

适用于

IncludeProperties<TEntity>(IndexBuilder<TEntity>, String[])

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

在面向SQL Server时配置索引包括属性。

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> IncludeProperties<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, params string[] propertyNames);
static member IncludeProperties : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
<Extension()>
Public Function IncludeProperties(Of TEntity) (indexBuilder As IndexBuilder(Of TEntity), ParamArray propertyNames As String()) As IndexBuilder(Of TEntity)

类型参数

TEntity

参数

indexBuilder
IndexBuilder<TEntity>

要配置的索引的生成器。

propertyNames
String[]

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

返回

IndexBuilder<TEntity>

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

注解

有关详细信息和示例,请参阅为实体类型和关系建模和使用 EF Core 访问SQL Server和Azure SQL数据库

适用于