示例#1
0
 public void Put([FromBody] UpdateRoleUICommand command)
 {
     Execute(() =>
     {
         _roleLogic.Update(command);
     });
 }
        public void Update(UpdateRoleUICommand command)
        {
            var role = _systemRoleRepository.Get(command.Id);

            if (role == null)
            {
                throw new DomainException(ErrorMessage.RoleIsNotExist);
            }
            role.Edit(command.Name, command.Description, new Guid(), _timeSource.LocalNow());
            using (var unitOfWork = _unitOfWorkFactory.GetCurrentUnitOfWork())
            {
                _systemRoleRepository.Edit(role);
                unitOfWork.Commit();
            }
        }
 public void Put(UpdateRoleUICommand command)
 {
     _systemRoleLogic.Update(command);
 }