[]
        
(Showing Draft Content)

C1.LiveLinq.AdoNet.AdoNetExtensions.IndexedField

IndexedField Method

IndexedField<T>(DataRow, int)

A hint to create and use an index on the specified data column. The hint has default action.

Declaration
public static T IndexedField<T>(this DataRow row, int columnIndex)
Parameters
Type Name Description
DataRow row

The data row.

int columnIndex

The zero-based ordinal position of the column.

Returns
Type Description
T

The data column value.

Type Parameters
Name Description
T

The type of the data column

Remarks

Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible. When the query is executed, the hint method IndexedField is replaced with the standard LINQ to DataSet extension method Field. See Hints for more details.

Examples
var query = from c in customersTable
    where c.IndexedField<string>(0) == "ALFKI"
    select c;

IndexedField<T>(DataRow, DataColumn)

A hint to create and use an index on the specified data column. The hint has default action.

Declaration
public static T IndexedField<T>(this DataRow row, DataColumn column)
Parameters
Type Name Description
DataRow row

The data row.

DataColumn column

The data column.

Returns
Type Description
T

The data column value.

Type Parameters
Name Description
T

The type of the data column

Remarks

Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible. When the query is executed, the hint method IndexedField is replaced with the standard LINQ to DataSet extension method Field. See Hints for more details.

Examples
var query = from c in customersTable
    where c.IndexedField<string>(customerColumn) == "ALFKI"
    select c;

IndexedField<T>(DataRow, string)

A hint to create and use an index on the specified data column. The hint has default action.

Declaration
public static T IndexedField<T>(this DataRow row, string columnName)
Parameters
Type Name Description
DataRow row

The data row.

string columnName

The name of the column.

Returns
Type Description
T

The data column value.

Type Parameters
Name Description
T

The type of the data column

Remarks

Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible. When the query is executed, the hint method IndexedField is replaced with the standard LINQ to DataSet extension method Field. See Hints for more details.

Examples
var query = from c in customersTable
    where c.IndexedField<string>("CustomerID") == "ALFKI"
    select c;

IndexedField<T>(DataRow, int, IndexingHintAction)

A hint to create and use an index on the specified data column. The hint has specified action.

Declaration
public static T IndexedField<T>(this DataRow row, int columnIndex, IndexingHintAction action)
Parameters
Type Name Description
DataRow row

The data row.

int columnIndex

The zero-based ordinal position of the column.

IndexingHintAction action

The action specified by the hint.

Returns
Type Description
T

The data column value.

Type Parameters
Name Description
T

The type of the data column

Remarks

Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible. When the query is executed, the hint method IndexedField is replaced with the standard LINQ to DataSet extension method Field. See Hints for more details.

Examples
var query = from c in customersTable
    where c.IndexedField<string>(0, IndexingHintAction.Mandatory) == "ALFKI"
    select c;

IndexedField<T>(DataRow, DataColumn, IndexingHintAction)

A hint to create and use an index on the specified data column. The hint has specified action.

Declaration
public static T IndexedField<T>(this DataRow row, DataColumn column, IndexingHintAction action)
Parameters
Type Name Description
DataRow row

The data row.

DataColumn column

The data column.

IndexingHintAction action

The action specified by the hint.

Returns
Type Description
T

The data column value.

Type Parameters
Name Description
T

The type of the data column

Remarks

Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible. When the query is executed, the hint method IndexedField is replaced with the standard LINQ to DataSet extension method Field. See Hints for more details.

Examples
var query =
    from c in customersTable
    where c.IndexedField<string>(customerColumn, IndexingHintAction.Mandatory) == "ALFKI"
    select c;

IndexedField<T>(DataRow, string, IndexingHintAction)

A hint to create and use an index on the specified data column. The hint has specified action.

Declaration
public static T IndexedField<T>(this DataRow row, string columnName, IndexingHintAction action)
Parameters
Type Name Description
DataRow row

The data row.

string columnName

The name of the column.

IndexingHintAction action

The action specified by the hint.

Returns
Type Description
T

The data column value.

Type Parameters
Name Description
T

The type of the data column

Remarks

Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible. When the query is executed, the hint method IndexedField is replaced with the standard LINQ to DataSet extension method Field. See Hints for more details.

Examples
var query =
    from c in customersTable
    where c.IndexedField<string>("CustomerID", IndexingHintAction.Mandatory) == "ALFKI"
    select c;