Exemplo n.º 1
0
        public void Handle(CreditMoney command)
        {
            var bankAccount = _repository.GetById <BankAccount>(command.AccountId);

            bankAccount.CreditMoney(new Money(command.Amount, command.Currency));
            _repository.Save(bankAccount);
        }
Exemplo n.º 2
0
 public CommandResult Credit([FromBody] CreditMoney command)
 {
     return(CommandProcessor.Execute(command));
 }