DataSource for Entity Framework in WPF
C1.LiveLinq.AdoNet Namespace / AdoNetExtensions Class / IndexedField Method / IndexedField<T>(DataRow,String) Method
The type of the data column
The data row.
The name of the column.

In This Topic
    IndexedField<T>(DataRow,String) Method
    In This Topic
    A hint to create and use an index on the specified data column. The hint has default action.
    Public Overloads Shared Function IndexedField(Of T)( _
       ByVal row As DataRow, _
       ByVal columnName As String _
    ) As T
    public static T IndexedField<T>( 
       DataRow row,
       string columnName


    The data row.
    The name of the column.

    Type Parameters

    The type of the data column

    Return Value

    The data column value.
    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 C1.LiveLinq.Hints for more details.
    var query = from c in customersTable
        where c.IndexedField<string>("CustomerID") == "ALFKI"
        select c;
    See Also