Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 790 Bytes

File metadata and controls

13 lines (8 loc) · 790 Bytes

Exercise 02 - Getting the current entity state from events

Having a defined structure of events and an entity representing the shopping cart from the previous exercise, fill a GetShoppingCart function that will rebuild the current state from events.

If needed you can modify the events or entity structure.

There are two variations:

Select your preferred approach (or both) to solve this use case.

Reminder: In Event Sourcing, we're rebuilding the current state by applying on it events data in order of appearance