[]
        
(Showing Draft Content)

C1.LiveLinq.AdoNet.AdoNetExtensions.AsIndexed

AsIndexed Method

AsIndexed(DataTable)

Wraps a DataTable in an IndexedDataTable<DataRow> so it can be indexed and queried using the optimized query operators from IndexedQueryExtensions.

Declaration
public static IndexedDataTable<DataRow> AsIndexed(this DataTable table)
Parameters
Type Name Description
DataTable table

A DataTable to represent as an IndexedDataTable<DataRow>.

Returns
Type Description
IndexedDataTable<DataRow>

An IndexedDataTable<DataRow> that contains the same rows as table and enables indexing of its rows.

Remarks

Use this method to index ADO.NET data tables and query them using the query operators optimized with indexing.

Elements of the source data table aren't duplicated or copied to a new collection. This method just wraps the original data table in an IndexedDataTable<DataRow>.

Note: The IndexedDataTable<DataRow> wrapper is owned by the original DataTable object (in fact, it is stored in its ExtendedProperties). So, if you create a wrapper for the same data table several times, it will be the same object.

AsIndexed<TRow>(DataTable)

Wraps a DataTable in an IndexedDataTable<TRow> so it can be indexed and queried using the optimized query operators from IndexedQueryExtensions.

Declaration
public static IndexedDataTable<TRow> AsIndexed<TRow>(this DataTable table) where TRow : DataRow
Parameters
Type Name Description
DataTable table

A DataTable to represent as an IndexedDataTable<TRow>.

Returns
Type Description
IndexedDataTable<TRow>

An IndexedDataTable<TRow> that contains the same rows as table and enables indexing of its rows.

Type Parameters
Name Description
TRow

The type of the rows in the table.

Remarks

Use this method to index ADO.NET data tables and query them using the query operators optimized with indexing.

Elements of the source data table aren't duplicated or copied to a new collection. This method just wraps the original data table in an IndexedDataTable<TRow>.

Note: The IndexedDataTable<TRow> wrapper is owned by the original DataTable object (in fact, it is stored in its ExtendedProperties). So, if you create a wrapper for the same data table several times, it will be the same object.

AsIndexed<TRow>(TypedTableBase<TRow>)

Wraps a typed ADO.NET data table in an IndexedDataTable<TRow> so it can be indexed and queried using the optimized query operators from IndexedQueryExtensions.

Declaration
public static IndexedDataTable<TRow> AsIndexed<TRow>(this TypedTableBase<TRow> table) where TRow : DataRow
Parameters
Type Name Description
TypedTableBase<TRow> table

A typed data table to represent as an IndexedDataTable<TRow>.

Returns
Type Description
IndexedDataTable<TRow>

An IndexedDataTable<TRow> that contains the same rows as table and enables indexing of its rows.

Type Parameters
Name Description
TRow

The type of the rows in the table.

Remarks

Use this method to index typed data tables and query them using the query operators optimized with indexing.

Elements of the source data table aren't duplicated or copied to a new collection. This method just wraps the original data table in an IndexedDataTable<TRow>.

Note: The IndexedDataTable<TRow> wrapper is owned by the original DataTable object (in fact, it is stored in its ExtendedProperties). So, if you create a wrapper for the same data table several times, it will be the same object.