I’m in the design phase of a small project.I’ve an activity class and resource class.
Each activity can have multiple resources, So my question is should I create a collection of resources like IList<resource> and add it to Activity class or should I create some service class whose purpose is to assign resources to each activity
Regards,
Ravi
You should create both.
In your domain model, the Activity class should contain ICollection.
In your Service / Business Logic class, you should have ability to add.remove Resources from Activity
Assigning single responsibility to classes helps keeping your code clean and maintainable.
Hope it helps.