Пример #1
0
 public void Handle(CloseTodoCommand command, IEventPublisher publisher)
 {
     if (State != TodoState.CLOSED)
     {
         publisher.Publish(new TodoIsClosedEvent(command.UUID));
     }
 }
Пример #2
0
        public ActionResult Close(CloseViewModel vm)
        {
            var command = new CloseTodoCommand(vm.Id);

            _bus.Send(command);
            return(RedirectToActionPermanent("Index"));
        }