When to use a 'Specification' vs when to a 'Query Service'? #722
Answered
by
ardalis
nabeelfarooqui98
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
ardalis
Apr 1, 2024
Replies: 1 comment 2 replies
-
Yes the existence of query objects in the template is meant to demonstrate that you're not bound by some rule that says all data access must be through specifications - or even repositories. Instead, especially if you're able to take advantage of Command-Query-Responsibility-Segregation (CQRS), you can use different approaches where appropriate.
Hope that clarifies. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
nabeelfarooqui98
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes the existence of query objects in the template is meant to demonstrate that you're not bound by some rule that says all data access must be through specifications - or even repositories. Instead, especially if you're able to take advantage of Command-Query-Responsibility-Segregation (CQRS), you can use different approaches where appropriate.