Esempio n. 1
0
        public Task <bool> Handle(RemoverTipoAppCommand message, CancellationToken cancellationToken)
        {
            #region Basic Validation
            if (!message.IsValid())
            {
                NotifyValidationErrors(message);
                return(Task.FromResult(false));
            }
            #endregion

            if (Commit())
            {
                _bus.RaiseEvent(new RemoverPerfilEvent());
            }

            return(Task.FromResult(true));
        }
        public void Remover(Guid id)
        {
            var command = new RemoverTipoAppCommand(id);

            _bus.SendCommand(command);
        }