|
|
|
|
|
by tags2k
238 days ago
|
|
Since everyone's giving !opinions, in my C# DDD world you'd ideally be able to: _unitOfWork.Begin();
var users = await _usersRepo.Load(u => u.LastLogin <= whateverDate);
users.CheckForExpiry();
_unitOfWork.Commit();
That then writes the "send expiry email" commands from the aggregate, to an outbox, which a worker then picks up to send. Simple, transactional domain logic. |
|