public override List <T> RetrieveAll <T>() { var lstObjs = new List <T>(); var lstResult = dao.ExecuteQueryProcedure(Mapper.GetRetriveAllStatement()); var dic = new Dictionary <string, object>(); if (lstResult.Count > 0) { var objs = Mapper.BuildObjects(lstResult); foreach (var c in objs) { lstObjs.Add((T)Convert.ChangeType(c, typeof(T))); } } return(lstObjs); }
public List <T> ObtenerDistribuidores <T>(string idTienda) { var lstObjs = new List <T>(); var mapperDistribuidor = new DistribuidorMapper(); var lstResult = dao.ExecuteQueryProcedure(Mapper.ObtenerDistribuidoresSentencia(idTienda)); var dic = new Dictionary <string, object>(); if (lstResult.Count > 0) { var objs = mapperDistribuidor.BuildObjects(lstResult); foreach (var c in objs) { lstObjs.Add((T)Convert.ChangeType(c, typeof(T))); } } return(lstObjs); }