I will try to go directly into detail. I want to implement with CSLA a business object which will support the following:
Could you please advise me what it is the best way to implement this situation in CSLA?
I have actually done something like this before in a manner that is probably a little unconventional.
To draw an analogy, I would have ended up creating a EmployeeSelectableTaskList - this EmployeeSelectableTaskList would be fetched depending on the department of the employee and would do a "refetch" (async on propertyhaschanged in our case) upon department change. The list would be composed of a list of all possible selectable tasks. The EmployeeSelectableTask would contain an IsSelected property.
Fetching would bring back all possible tasks (not just those selected) - in my case it is in the neighborhood of 20-30 so it's totally acceptable. If it were hundreds, probably not acceptable. Persistence is short circuited for the children such that the root object looks @ the child collection and what is selected and handles the persistence itself. In our case, we're somewhat indiscriminate and we just wipe out existing tasks and re-insert selected tasks.
The nature of this allows for a very simple databinding experience in our scenario (Silverlight app for us). It works really well in the scenario we use it for.
Copyright (c) Marimer LLC