예제 #1
0
 public Task <Unit> Handle(ConfirmCart command, CancellationToken cancellationToken)
 {
     return(cartRepository.GetAndUpdate(
                command.CartId,
                cart => cart.Confirm(),
                cancellationToken));
 }
예제 #2
0
        private void Handle(ConfirmCart command)
        {
            var domainEvent = new CartConfirmed();

            Persist(domainEvent, Apply);
        }
예제 #3
0
 //Confirm cart
 private bool Validate(ConfirmCart command)
 {
     //If this command is acceptable by the current state, then we will accept it
     return(Accept());
 }