public RolesAccessDTO InserRoleAccess(RolesAccessDTO data) { RolesAccess rolesToInsert = new RolesAccess(); rolesToInsert = RolesAccessRequestFormatter.ConvertRespondentInfoFromDTO(data); var responseData = _unitOfWork.RolesAccessRepository.Create(rolesToInsert); return(RolesAccessRequestFormatter.ConvertRespondent(responseData)); }
public int UpdateRolesAccess(RolesAccessDTO data) { RolesAccess rolesToUpdate = new RolesAccess(); rolesToUpdate = RolesAccessRequestFormatter.ConvertRespondentInfoFromDTO(data); int res = _unitOfWork.RolesAccessRepository.Update(rolesToUpdate); _unitOfWork.Save(); return(res); }