One of the common concerns of the A+ES design approach is how to query the Aggregates by their properties. Event Sourcing does not provide a simple way to answer a question such as “What is the total amount of all customer orders within the last month?” We would actually need to load every
Customer instance, enumerate all of the
Order instances within the last month for each one, and calculate their total, which would be extremely inefficient.
This is where Read Model Projections can help. Read Model Projections can be realized through a simple set of Domain Event subscribers that are used to generate and update a persistent Read Model. In other words, they project Events to a persistent Read Model. When Event subscribers ...