public void Handler(DeletarEntregaCommand message) { if (!ValidaMessage(message)) { return; } _entregaRepository.Deletar(message.Id.Value); ValidaCommitError(); }
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); }