public void Handle(CreditMoney command) { var bankAccount = _repository.GetById <BankAccount>(command.AccountId); bankAccount.CreditMoney(new Money(command.Amount, command.Currency)); _repository.Save(bankAccount); }
public CommandResult Credit([FromBody] CreditMoney command) { return(CommandProcessor.Execute(command)); }