public GetRolesResponse GetRoles() { var response = new GetRolesResponse(); try { response.RolViewModel = RolMapper.ConvertToRolViewModel(_rolRepository.GetByCriteria(x => x.IsActivo)); response.IsValid = true; } catch (Exception ex) { response.IsValid = false; response.ErrorMessage = ex.Message; } return(response); }