- Queries: Return a result and do not change the observable state of the system (are free of side effects).
- Commands: Change the state of a system but do not return a value.
COS model :
I studied on command processor class library in fnhmvc project in codeplex and it’s really good structure.We could examine more detailed with this post.The Command Processor consist of handler classes(command handler,validation handler),result classes(command result,validation result), diverse interfaces(ICommand,ICommandResult,ICommandResults) and DefaultCommandBus Class.Main processor class is the DefaultCommandBus class.We execute repository operations in this class.
you can download all codes my project via github , have a good coding