public void Handle(CloseTodoCommand command, IEventPublisher publisher) { if (State != TodoState.CLOSED) { publisher.Publish(new TodoIsClosedEvent(command.UUID)); } }
public ActionResult Close(CloseViewModel vm) { var command = new CloseTodoCommand(vm.Id); _bus.Send(command); return(RedirectToActionPermanent("Index")); }