I am building a dotnet api that uses the following patterns. It will using clean…
Jump to turn (7)
- User
I am building a dotnet api that uses the following patterns. It will using clean architecture for organizing my project. It will use cqrs for commands and queries. It will use event sourcing and use dynamodb as my event store. The domain layer will be comprised of DDD concepts. How would you build a LoanAggregate that replays events from the event store to build the aggregate to it's current state. The aggregate would process an LoanStatusUpdateEvent that has the LoanIdentifier, Status and time. That would update the loan aggregate property of status. The command to update the status needs to make sure the the time of the aggregate isn't ahead of the command time. If so it will reject it. I also need the aggregate to have a list of entities called Qualifications. A qualification entity is a Domain and Status (qualified or disqualified) and the event it processes is QualificationChangedEvent that has the domain, status and time. It needs similar functionality in the aggregate but it needs to update the specific entity in the list using the domain as it's id.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.