How vkhorikov/cqrsinpractice works
Project type and purpose
• This is a sample full-stack demonstration app for learning CQRS (Command Query Responsibility Segregation). It consists of:
• A WPF desktop UI (“UI” folder)
• An ASP.NET Core Web API (“Api” folder)
• A domain/logic layer implementing CQRS (“Logic” folder)
• A relational database (SQL scripts at root)
File structure
• Top level:
• After/ — final refactored CQRS version
• Before/ — original monolithic version
• Each version has three main projects under src/:
• Api: controllers, startup, exception handling, envelope utils
• Logic: AppServices (commands & queries), domain entities & maps, decorators (audit, retry), NHibernate utils
• UI: WPF views & view-models, command infrastructure, ApiClient
• Ancillary files: solution file (CqrsInPractice.sln), database scripts (DatabaseInitial.sql, DatabaseReads.sql), config files.
README insights
• Two complete versions (“Before” vs “After”) to compare non-CQRS vs CQRS architecture.
• Requires a SQL database; connection string lives in Api/appsettings.json.