Associates database-specific index hints with a query.

Namespace:  Mindscape.LightSpeed.Linq
Assembly:  Mindscape.LightSpeed.Linq (in Mindscape.LightSpeed.Linq.dll)
Version: 4.0.0.0 (4.0.0.0)

Syntax

C#
public static IQueryable<T> WithIndexHint<T>(
	IQueryable<T> source,
	params string[] indexes
)
Visual Basic (Declaration)
Public Shared Function WithIndexHint(Of T) ( _
	source As IQueryable(Of T), _
	ParamArray indexes As String() _
) As IQueryable(Of T)

Parameters

source
Type: System.Linq..::.IQueryable<(Of <(T>)>)
An IQueryable<(Of <(T>)>) with which to associate the database-specific options.
indexes
Type: array< System..::.String >[]()[]
The database indexes to pass to the database query planner in the hint.

Type Parameters

T
The type of the elements of source.

Return Value

An IQueryable<(Of <(T>)>) which will perform the same query, but with the specified database-specific options.

Remarks

Supported on SQL Server and Oracle only.

See Also