The fund administration project is a demonstration based on how a fund administration business would operate, using CQRS and Event Sourcing for their application backbone.

Building the model

Start a new Visual Studio project and add a new CQRS model:-

This will open an empty diagram designer for you to create the model on.

Add top level attributes
For each "thing" in your system you need to add a top level attribute class, and give it a name and description. You also need to set the name and type of the field which uniquely identifies the attribute. (This can be a key generated by the system if there is no business meaningful unique identifier)

Add events for the attribute
Add an event class for every event that can happen to that aggregate. Give each event a descriptive name (the convention is to use a past tense verb phrase such as "AddressChanged") and add any properties associated to that event.

You can add a large number of events to each aggregate identifier.

Add commands to the model
Add a command for every action that can be performed against an aggregate. You can add input parameters to the command that are passed in to the command. Commands are typically named using a present tense verb from.

Add projections to the model
Add a projection to the model for each view of the event data you require. A projection can process (or handle) a number of events so these should also be linked to the projection.

Add queries to the model
Add a query for each external question you are going to be able to ask of the model. A query can have input parameters to pass in, and returns query properties when executed.

Model level properties
There are also documentation properties that apply to the entire model such as company name and copyright text.

Last edited Jul 28, 2015 at 2:44 PM by Merrion, version 7