Hi!
Our Silverlight 5 application's BOL has a couple of business objects with pretty deep hierarchy.
Such as
ProductEdit => SectionList => SectionEdit => FieldList => StepList => StepEdit =>SecuritySettingsList=>etc.
Some validation rules defined on child level but other like “NoDuplicateFieldName” defined on ProductEdit (EditableRoot) level.
Currently we call rule re-check of these rules from OnChildChangedoverride.
Is that the right strategy?
Our problem is that after upgrading to CSLA v4.5 we found that our ViewModel’s ModelPropertyChanged
method is getting called hundreds of times when say one of the stepEdit objects
changed. I guess that caused by changes
in BusinessBase OnChildChanged (MetaPropertyHasChanged)
Our current solution to the problem is to override MetaPropertyHasChanged in our custom BusinesBase class:
protectedoverridevoid MetaPropertyHasChanged(string name)
{
// TODO: find a better way to avoid multiple business rule checks.
}
Thanks in advance,
Maxim