API Reference
Class
DataReaderMappingExtensions
Typed row projections for any forward-only DbDataReader.
Inheritance
- Object
- DataReaderMappingExtensions
Methods
RowsAs``1 3 overloads
public static IEnumerable<T> RowsAs<T>(DbDataReader reader) #Returns:
IEnumerable<T>Projects the remaining unread rows by matching column names to writable public properties. The caller retains ownership of the reader.
Type Parameters
- T
Parameters
- reader System.Data.Common.DbDataReader
public static IEnumerable<T> RowsAs<T>(DbDataReader reader, Action<RowMapper<T>> configure) #Returns:
IEnumerable<T>Projects the remaining unread rows using explicit column assignments. The caller retains ownership of the reader.
Type Parameters
- T
Parameters
- reader System.Data.Common.DbDataReader
- configure System.Action{OfficeIMO.Data.RowMapper{``0}}
public static IEnumerable<T> RowsAs<T>(DbDataReader reader, Func<IDataRecord, T> factory) #Returns:
IEnumerable<T>Projects the remaining unread rows with a caller-supplied factory. This overload supports constructor-bound and other models without a public parameterless constructor. The caller retains ownership of the reader.
Type Parameters
- T
Parameters
- reader System.Data.Common.DbDataReader
- Reader positioned before the first row to project.
- factory System.Func{System.Data.IDataRecord,``0}
- Creates one model instance from the current row.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object