DDD Fetching List of Roots
So, I've got a WCF service that accepts commands and maps them to calls
into the domain services layer. When doing write type of commands to the
domain, this pattern is nearly perfect.
What I'm wondering is how everyone is doing reads, more specifically,
getting lists of aggregates from the model for display. As I stated, I
have a WCF service that calls into the service layer. Currently, I have a
method on my service that returns a list of aggregate roots. Somehow, this
feels a bit dirty. I'm polluting my domain services with GetByXXXX kind of
methods.
I'm looking for a bit of guidance on the search and retrieval of domain
objects through the application services layer.
Edit:
Thinking and reading a bit more, is it appropriate to directly use a
repository in the application layer to handle fetching of entities?
No comments:
Post a Comment