Exemplo n.º 1
0
        public RolesAccessDTO InserRoleAccess(RolesAccessDTO data)
        {
            RolesAccess rolesToInsert = new RolesAccess();

            rolesToInsert = RolesAccessRequestFormatter.ConvertRespondentInfoFromDTO(data);
            var responseData = _unitOfWork.RolesAccessRepository.Create(rolesToInsert);

            return(RolesAccessRequestFormatter.ConvertRespondent(responseData));
        }
Exemplo n.º 2
0
        public int UpdateRolesAccess(RolesAccessDTO data)
        {
            RolesAccess rolesToUpdate = new RolesAccess();

            rolesToUpdate = RolesAccessRequestFormatter.ConvertRespondentInfoFromDTO(data);
            int res = _unitOfWork.RolesAccessRepository.Update(rolesToUpdate);

            _unitOfWork.Save();
            return(res);
        }