❔ Advice on Data modeling-ef core
Basically I've got a lesson which is an aggregate root, On said lesson i got phases and each phase has an answer.
I want to be able to save past answers aswell to analyze.
Current Code:
So I've come up with 2 approaches:
1.A phase will contain a list of answers and we will only load the last added to the db when making calls, Was unsure how to do it and Chat-gpt gave me this:
2.create a new entity named pastAnswer that sits on Phase, but doesnt load it except for when we want to load it for something
And when the user submits a new answer, it gets saved as a past answer, and the new answer becomes the user answer
I want to be able to save past answers aswell to analyze.
Current Code:
So I've come up with 2 approaches:
1.A phase will contain a list of answers and we will only load the last added to the db when making calls, Was unsure how to do it and Chat-gpt gave me this:
2.create a new entity named pastAnswer that sits on Phase, but doesnt load it except for when we want to load it for something
And when the user submits a new answer, it gets saved as a past answer, and the new answer becomes the user answer