public decimal Handle(GetDisposableAmountQuery query) { var maybeAccount = _archive.GetAccount(query.AccountId); if (maybeAccount.HasValue()) { var account = maybeAccount.ValueOrDefault(null); return(_archive.GetBalance(query.AccountId).ValueOrDefault(0) + account.creditLimit); } return(0); }
public decimal Handle(GetBalanceQuery query) { return(_archive.GetBalance(query.Account).ValueOrDefault(0)); }