Two Aggregates, One Method
Wallet.TransferFunds mutates a second aggregate root inside the first one's method - the textbook DDD violation, committed for a good reason. The reason survives the domain layer and does not survive the handler.
Newest first, grouped by year. Search or filter by topic.
Wallet.TransferFunds mutates a second aggregate root inside the first one's method - the textbook DDD violation, committed for a good reason. The reason survives the domain layer and does not survive the handler.
Inflow's Wallet has no balance column - the balance is a fold over the transfer ledger, computed the same way on the write side and the read side. It is the best decision in the module, and it costs more than it looks.
Availability's Resource aggregate enforces one real business rule - a higher-priority reservation evicts yours and announces it. The invariant, the struct value object behind it, and the day-integer it becomes on disk.