Container-friendly domain events and disposable actions(www.lostechies.com)
submitted by
schalkvanwyk(1335) 1 year, 5 months ago
A lot of times an operation on a single aggregate root needs to result in side effects that are outside the aggregate root boundary. There are several ways to accomplish this, such as:
- A return parameter on the method
- A collecting parameter
- Domain events
Contextual containers and disposable actions
What I need to do is allow this static method to work with a contextual, scoped piece of code. But that’s exactly what the “using” statement allows us to do – create a scoped piece of code, that executes something at the beginning (whatever creates the IDisposable) and something at the end (the Dispose method). read more...
|category: Patterns
|Views: 8
tags:
Patterns C# another
Everyones tags:
Your Tags: