Object graph and IsValid #4289
-
We have a root object with a couple of Collections as child objects. In our root object we do have the following method protected override void OnChildChanged(Csla.Core.ChildChangedEventArgs e)
{
if (e.ChildObject is Person)
{
BusinessRules.CheckRules(ObjPersonProperty);
OnPropertyChanged(ObjPersonProperty);
} But calling the BusinessRules.CheckRules on collection child object is not marking the root object valid/invalid. Kind Regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The Collection objects are valid or not based on whether any of the child objects in the collection are valid. |
Beta Was this translation helpful? Give feedback.
The
IsValid
property should return the value for the entire object graph. TheIsSelfValid
returns the value only for one object.Collection objects are valid or not based on whether any of the child objects in the collection are valid.