I recently made some changes to an inherited project that uses DataReaders for data access.

Just a tiny change, alter that one query. Of course the output is quite different, so I left the query in DataReader land, and sent the output to a more palatable IEnumerable<T>.

public static IEnumerable<T> Select<T>( this IDataReader reader, Func<IDataReader, T> projection )
    while (reader.Read()) {
        yield return projection(reader);
AuthorLachlan Roche