add simplification steps

This commit is contained in:
Oli Sturm
2026-04-21 23:04:56 +01:00
parent 62ced3935c
commit b193f64861
20 changed files with 392 additions and 4 deletions
@@ -0,0 +1,17 @@
using CsharpFp2.Domain;
namespace CsharpFp2.Application;
public static class AccountApplicationService
{
public static void WithdrawMoney(IAccountRepository repository, Guid accountId, decimal amount)
{
var account =
repository.GetById(accountId)
?? throw new InvalidOperationException("Account not found.");
account.Withdraw(new Money(amount));
repository.Save(account);
}
}