public async void Handle(IEvent @event) { ClienteExcluidoEvent customerDeletedEvent = (ClienteExcluidoEvent)@event; await readModelRepository.Remove(customerDeletedEvent.Id); logger.Info("A new CustomerDeletedEvent has been processed: {0} ({1})", customerDeletedEvent.Id, customerDeletedEvent.Version); }
public async Task <IActionResult> excluir() { ClienteExcluidoEvent clienteExcluidoEvent = new ClienteExcluidoEvent(); await _bus.SendMessage(clienteExcluidoEvent); return(Ok()); }
private void Apply(ClienteExcluidoEvent e) { Version = e.Version++; }
public void Handle(ClienteExcluidoEvent notification) { }