public override List <T> RetrieveAll <T>() { var lst = new List <T>(); try { var instance = SqlDao.GetInstance(); var lstResult = instance.ExecuteQueryProcedure(_mapper.GetRetriveAllStatement()); if (lstResult.Count > 0) { var objs = _mapper.BuildObjects(lstResult); foreach (var obj in objs) { lst.Add((T)Convert.ChangeType(obj, typeof(T))); } } } catch (Exception ex) { _exMan.ManageException(ex); } return(lst); }
public override List <T> RetrieveAll <T>() { var lstRoles = new List <T>(); var lstResult = dao.ExecuteQueryProcedure(mapper.GetRetrieveAllStatement()); var dic = new Dictionary <string, object>(); if (lstResult.Count > 0) { var objs = mapper.BuildObjects(lstResult); foreach (var c in objs) { lstRoles.Add((T)Convert.ChangeType(c, typeof(T))); } } return(lstRoles); }
public List <T> RetrieveByIdComercio <T>(BaseEntity entity) { var lstRol = new List <T>(); var lstResult = dao.ExecuteQueryProcedure(mapper.GetRetriveByIdComercioStatement(entity)); var dic = new Dictionary <string, object>(); if (lstResult.Count > 0) { var objs = mapper.BuildObjects(lstResult); foreach (var c in objs) { lstRol.Add((T)Convert.ChangeType(c, typeof(T))); } } return(lstRol); }