Updating the Monolith Modules
Learn how to update the aggregates, events, and event handlers in the monolith modules.
We'll cover the following
We will be using the Store Management module to demonstrate the code updates that each module will receive. The rest we will leave for you or your compiler to explore on your own.
Updating the aggregates
All of the locations in the monolith modules where new aggregates were instantiated will need to be modified to utilize the new NewAggregate()
constructor. This modification is done in a few parts. We will create a constant to contain the aggregate name, create a constructor for the aggregate, and finally, replace each occurrence of aggregate instantiation.
For the Store
aggregate, the following constructor is added:
Get hands-on with 1400+ tech skills courses.