Today I was working on an app and I stumbled upon something that made me wonder. What is the best practice in this one:
Say I have two entities
Task. Both of those entities have a corresponding repository.
Now you want to add a method to the
ProjectRepository to mark a project as complete. Marking a project complete will also mean all tasks of the project have to be marked as complete.
Do you do this in the same repository? Does a
TaskRepository stuff? Or do you call one repository from the other?
Other example could be creating a new
Project and also add a few
Of course there's no real right or wrong I think, just wondering what you guys think.