Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Translate Method

DataContext.Translate Method

Converts an existing IDataReader to objects.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Translate(DbDataReader) Converts an existing DbDataReader to objects.
Public method Translate<TResult>(DbDataReader) Converts an existing DbDataReader to objects.
Public method Translate(Type, DbDataReader) Converts an existing DbDataReader to objects.
Top

Each row in the IDataReader is converted to an object in the IEnumerable<T>.

public IEnumerable<T> Translate<T>(IDataReader reader) {}

Description: This method is used to convert an existing DbDataReader to objects. Each row in the DbDataReader is converted to an object in the IEnumerable<T>.

Generic parameters:

T: See ExecuteQuery.

Parameters:

Query: See the description for command under ExecuteCommand.

Parameters: See the description for parameters under ExecuteCommand.

Return type:

IEnumerable<T>: collection of objects returned by the conversion.

Show:
© 2015 Microsoft