SqlServerIndexBuilderExtensions.IncludeProperties Method

Definition

Overloads

IncludeProperties(IndexBuilder, String[])

Configures index include properties when targeting SQL Server.

IncludeProperties(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)

Configures index include properties when targeting SQL Server.

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

Configures index include properties when targeting SQL Server.

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

Configures index include properties when targeting SQL Server.

IncludeProperties(IndexBuilder, String[])

Configures index include properties when targeting 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

Parameters

indexBuilder
IndexBuilder

The builder for the index being configured.

propertyNames
String[]

An array of property names to be used in 'include' clause.

Returns

A builder to further configure the index.

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to

IncludeProperties(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)

Configures index include properties when targeting 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

Parameters

indexBuilder
IConventionIndexBuilder

The builder for the index being configured.

propertyNames
IReadOnlyList<String>

An array of property names to be used in 'include' clause.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to

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

Configures index include properties when targeting 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)

Type Parameters

TEntity

Parameters

indexBuilder
IndexBuilder<TEntity>

The builder for the index being configured.

includeExpression
Expression<Func<TEntity,Object>>

A lambda expression representing the property(s) to be included in the 'include' clause (blog => blog.Url).

If multiple properties are to be included then specify an anonymous type including the properties (post => new { post.Title, post.BlogId }).

Returns

IndexBuilder<TEntity>

A builder to further configure the index.

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to

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

Configures index include properties when targeting 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)

Type Parameters

TEntity

Parameters

indexBuilder
IndexBuilder<TEntity>

The builder for the index being configured.

propertyNames
String[]

An array of property names to be used in 'include' clause.

Returns

IndexBuilder<TEntity>

A builder to further configure the index.

Remarks

See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to