Background

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:-
add_new_cqrs_model.png

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

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_aggregate_investor_designer.png

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.
add_event_registered.png

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

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_command_register.png

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_projection_summary.png

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.
add_query_summary.png

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

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