public void Execute(Guid accountId, decimal amount) { if (amount <= 0) { throw new ArgumentOutOfRangeException(nameof(amount)); } _withdrawCommand.Execute(accountId, amount); }
public void Execute(Guid fromAccountId, Guid toAccountId, decimal amount) { if (amount <= 0) { throw new ArgumentOutOfRangeException(nameof(amount)); } _withdrawCommand.Execute(fromAccountId, amount); _depositCommand.Execute(toAccountId, amount); }