The CQRS Kitchen is a .NET example application that demonstrates how to implement a CQRS / Event Sourcing application with the .NET Framework. It uses the following technologies:
- Silverlight 4
- Caliburn Micro
- NHibernate & LINQ
- Fluent NHibernate
- Windows Communication Foundation
- WCF Data Services
- Entity Framework 4
- Parts of the NCQRS framework
Check out this slide deck for some background information about this demonstration project.
- It uses NServiceBus to publish events from the event store to the query store, so you need to setup your MSMQ environment properly by executing RunMeFirst.bat from the Tools\NServiceBus folder. Remember, you must run this script from a Command Prompt under Administrative privileges.
- Two SQL Server 2008 databases are used: TheKitchenEvents and TheKitchenReadData. The first one can be created by running the Model.edmx.sql file inside the NCQRS project. The second one is automatically created whenever you run the CreateDatabases project.
- To run the solution, you need to configure the following projects as startup projects:
- TheKitchen.Client.Host (hosts the Silverlight 4 application)
- TheKitchen.Commanding.Host (hosts the WCF command service)
- TheKitchen.Querying.Core (hosts the NServiceBus event handler)
- TheKitchen.Querying.Host (hosts the WCF Data Services query service)
- The Querying.Core project runs by launching the NServiceBus self-hosting client, so you'll need to change the project's Debug tab so that it launches NServiceBus.Host.exe from the output location using startup parameter NServiceBus.Integration.
- Greg Young has been advocating CQRS and Event Sourcing for a while now and is an authority on CQRS. Find his blog here.
- Udi Dahan a well known authority on distributed systems has shed his light on CQRS in Clarified CQRS.
- Mark Nijhof has written some excellent posts on CQRS as well. Find them here.