SqlServerIndexBuilderExtensions.ForSqlServerInclude Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ForSqlServerInclude(IndexBuilder, String[]) |
Obsolete.
Configures index include properties when targeting SQL Server. |
ForSqlServerInclude(IConventionIndexBuilder, IReadOnlyList<String>, Boolean) |
Obsolete.
Configures index include properties when targeting SQL Server. |
ForSqlServerInclude<TEntity>(IndexBuilder<TEntity>, Expression<Func<TEntity,Object>>) |
Obsolete.
Configures index include properties when targeting SQL Server. |
ForSqlServerInclude(IndexBuilder, String[])
Caution
Use IncludeProperties
Configures index include properties when targeting 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
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.
- Attributes
Applies to
ForSqlServerInclude(IConventionIndexBuilder, IReadOnlyList<String>, Boolean)
Caution
Use IncludeProperties
Configures index include properties when targeting 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
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.
- Attributes
Applies to
ForSqlServerInclude<TEntity>(IndexBuilder<TEntity>, Expression<Func<TEntity,Object>>)
Caution
Use IncludeProperties
Configures index include properties when targeting 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)
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
A builder to further configure the index.
- Attributes
Applies to
Entity Framework