Esempio n. 1
0
        public void Handler(DeletarEntregaCommand message)
        {
            if (!ValidaMessage(message))
            {
                return;
            }

            _entregaRepository.Deletar(message.Id.Value);

            ValidaCommitError();
        }
Esempio n. 2
0
        public IActionResult Delete(Guid id)
        {
            if (!ModelState.IsValid)
            {
                NotificarErroModelInvalida();
                return(Response());
            }
            var deletarCommand = new DeletarEntregaCommand(id);

            _bus.SendCommand(deletarCommand);

            return(Response(deletarCommand));
        }
        public void Deletar(Guid id)
        {
            var deletarCommand = new DeletarEntregaCommand(id);

            _bus.SendCommand(deletarCommand);
        }