How can I map a DataReader object into a class object by using generics?
For example I need to do the following:
public class Mapper {
Well, i don't know if it fits here, but you could be using the yield keyword
public static IEnumerable MapObject(IDataReader dr, Func convertFunction) { while (dr.Read()) { yield return convertFunction(dr); } }