Notion of CQRS
See original GitHub issueIt should be straightforward to implement query only endpoints without having to implement all members of IResourceService
or IEntityRepository
and throwing NotImplementedExceptions. This issue is a placeholder until I can work out the design.
Until final release, there are no guarantees on non-breaking changes in pre-release versions
2017-6-11
This work is going to be done on feat/cqrs branch and available as pre-release v2.1.0-alpha1-*
2017-6-30
The current version is available on the unstable branch and can be installed from this MyGet feed. If everything goes well, I plan on wrapping up tests this weekend and pushing to NuGet as a beta.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
CQRS pattern - Azure Architecture Center
CQRS stands for Command and Query Responsibility Segregation, a pattern that separates read and update operations for a data store. Implementing CQRS in ......
Read more >CQRS - Martin Fowler
CQRS stands for Command Query Responsibility Segregation. It's a pattern that I first heard described by Greg Young.
Read more >A Beginner's Guide to CQRS
CQRS is an architectural pattern acronym, standing for Command Query Responsibility Segregation. It divides a system's actions into commands and queries. It is ......
Read more >What is CQRS (Command and Query Responsibility ...
The Command Query Responsibility Segregation (CQRS) pattern is a design pattern that separates the responsibilities of handling read (query) and write (command) ...
Read more >Concepts of CQRS
CQRS stands for Command Query Responsibility Segregation. As the name suggests, we split the application into two parts: Command-Side and Query- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@williamwong it looks to me like the DbContext is being used specifically in the example implementation of the MyReportService and isn’t required by any base class. Any concrete implementation would be able to define its own dependencies.
I also wonder what the reason is for the endpoint enums over using attributes on the controller?
With the interfaces segregated this way and by defining what methods are supported on the controller is there still a reason to also have separate Cmd/Query Controller/Services?
@williamwong if your service is implementing multiple interfaces, but not enough to fully implement IResourceCmdService or IResourceQueryService, you first need to inject the service for each implemented interface. Using Autofac, as an example, this is simply:
Then in your controller:
I haven’t compiled the above code, so please pardon errors