public T MapObject <T>(IRetriveData data) where T : class, new() { T obj = new T(); while (data.Read()) { MapValues(data, typeof(T).GetProperties(), obj); } return(obj); }
public List <T> MapList <T>(IRetriveData data) where T : class, new() { var list = new List <T>(); while (data.Read()) { var item = new T(); MapValues(data, typeof(T).GetProperties(), item); list.Add(item); } return(list); }