You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Persist the data represented by the domain layer into MartenDB.
This will require to migrate the DDD aggregates to an event sourced model.
We may need an application layer.
The persistence logic should be isolated into a Persistence layer.
The text was updated successfully, but these errors were encountered:
Fixes#18
Persist data represented by the domain layer into MartenDB by implementing an event-sourced model and creating a Persistence layer.
* **Domain Layer Changes:**
- Modify `RecordHistory` and `Workout` classes to implement event-sourced models.
- Add methods to handle events, apply them to the state, and retrieve uncommitted events.
- Ensure `SetNew` and `Comprise` methods raise events instead of directly modifying the state.
* **Persistence Layer:**
- Add `WorkoutRecords.Persistence` project with necessary dependencies.
- Implement `EventStore` class to handle event storage and retrieval using MartenDB.
- Create `WorkoutRepository` and `RecordHistoryRepository` to persist and retrieve events for `Workout` and `RecordHistory` aggregates.
* **Application Layer:**
- Add `WorkoutRecords.Application` project.
- Implement `WorkoutService` and `RecordHistoryService` to handle business logic and interact with repositories.
* **API Configuration:**
- Add `Startup.cs` to configure MartenDB and register repositories and services with the dependency injection container.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/jhiben/workout-records-api-dotnet/issues/18?shareId=XXXX-XXXX-XXXX-XXXX).
Persist the data represented by the domain layer into MartenDB.
This will require to migrate the DDD aggregates to an event sourced model.
We may need an application layer.
The persistence logic should be isolated into a Persistence layer.
The text was updated successfully, but these errors were encountered: