public List <T> RetrieveAllByTipo <T>(string tipo) { var lista = new List <T>(); var resultados = dao.ExecuteQueryProcedure(mapper.GetRetriveAllByTipo(tipo)); var dic = new Dictionary <string, object>(); if (resultados.Count > 0) { var objs = mapper.BuildObjects(resultados); foreach (var c in objs) { lista.Add((T)Convert.ChangeType(c, typeof(T))); } } return(lista); }