I have a parent object that contains a collection of children.
Parent -> ChildCollection - > Child
I have a business rule that the parent must have at least two children (rule is attached to "Children" attribute). In order to track counts and changes, the parent has AddChild and RemoveChild methods which call the PropertyHasChanged("Children").
I want to allow grid additions (using AddNewCore and AllowNew = true). But, this model allows the child collection to do it's own add so the parent isn't aware of the change.
What can I do?
Is there a different/better way to implement the rule?
Is there a way for the child to nofity the parent?
Thoughts?
Thanks,
Sean