[]
        
(Showing Draft Content)

C1.LiveLinq.Hints.Indexed

Indexed Method

Indexed<T>(T, IndexingHintAction)

A hint with specified action.

Declaration
public static T Indexed<T>(this T value, IndexingHintAction action)
Parameters
Type Name Description
T value

The value of the expression the hint is applied to. This value is not actually used by the hint, because the hint is never executed, its role is purely declarative.

IndexingHintAction action

The action specified by the hint.

Returns
Type Description
T

Formally, the hint returns the same value that it receives in the parameter. In fact, it is never executed, its role is purely declarative.

Type Parameters
Name Description
T

This can be any type, because hints are applicable to expressions of any type.

Remarks

A hint does not change the value of the expression it is applied to. It only tells LiveLinq query optimizer to create and use an index on that expression, if possible. In fact, hints are removed from the expression before it is executed.

See Also: How to create indexes.

Indexed<T>(T)

A hint with default action.

Declaration
public static T Indexed<T>(this T value)
Parameters
Type Name Description
T value

The value of the expression the hint is applied to. This value is not actually used by the hint, because the hint is never executed, its role is purely declarative.

Returns
Type Description
T

Formally, the hint returns the same value that it receives in the parameter. In fact, it is never executed, its role is purely declarative.

Type Parameters
Name Description
T

This can be any type, because hints are applicable to expressions of any type.

Remarks

Current default action is defined by the value of the static DefaultAction property. By default, it is IndexingHintAction.Optional.

Use the other Indexed overload if you need a hint with non-default action.

A hint does not change the value of the expression it is applied to. It only tells LiveLinq query optimizer to create and use an index on that expression, if possible. In fact, hints are removed from the expression before it is executed.

See Also: How to create indexes.