Exemple #1
0
        public ICommandResult Handle(DeleteNurseCommand command)
        {
            command.Validate();

            if (command.Invalid)
            {
                AddNotifications(command);
                return(new CommandResult(false, command.Notifications.Messages(), command));
            }

            _nurseRepository.Remove(command.Id);

            _uow.Commit();

            return(new CommandResult(true, "Sucesso!", command));
        }