This class help mapping IDataReader content to interface marked with ConcreteAttribute.
public class TypeMap<T>
{
public static T CreateConcrete();
public static T ReadCurrentRow(IDataReader reader);
public static IList<T> ReadSingleResultset(IDataReader reader);
public static T ReadMultiResultset(IDataReader reader, params string[] properties);
}TDescription: T is an interface that marked with ConcreteAttribute.
public static T CreateConcrete();Description: create object that implement the interface.
public static T ReadCurrentRow(IDataReader reader);Description: read row at current position from input data reader and return active object.
reader: data reader with Read function called before this function.
public static IList<T> ReadSingleResultset(IDataReader reader);Description: read all rows from input data reader and return list of rows.
reader: active IDataReader to call its Read function to pull the data.
public static T ReadMultiResultset(IDataReader reader, params string[] properties);Description: read all result sets from input data reader and bound them to object.
reader: IDataReader to read data.
properties: list of properties to bound the resultset.
Please refer to Examples section in Documentation page.