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:
- using mutable entities: Mutable/GettingStateFromEventsTests.cs,
- using fully immutable structures: Immutable/Solution1/GettingStateFromEventsTests.cs.
Select your preferred approach (or both) to solve this use case. If needed you can modify entities or events.
Run docker-compose script from the main workshop repository to start Postgres instance.
docker-compose up
After that you can use PG Admin (IDE for Postgres) to see how tables and data look like. It's available at: http://localhost:5050.
- Login:
admin@pgadmin.org
, Password:admin
- To connect to server click right mouse on Servers, then Register Server and use host:
postgres
, user:postgres
, password:Password12!