public List <T> RetrieveEmpresaByRuta <T>(BaseEntity entity) { var lstEmpresa = new List <T>(); var lstResult = dao.ExecuteQueryProcedure(_mapper.GetRetrieveEmpresaByRuta(entity)); if (lstResult.Count > 0) { var objs = _mapper.BuildObjects(lstResult); foreach (var c in objs) { lstEmpresa.Add((T)Convert.ChangeType(c, typeof(T))); } } return(lstEmpresa); }