Multiple Dependent Property Updates

Multiple Dependent Property Updates

Old forum URL: forums.lhotka.net/forums/t/12123.aspx


MadGerbil posted on Tuesday, August 20, 2013

I've the following properties: Date1, Date2

Any time one of those two properties changes they are compared and the Difference property is updated where Difference is the number of business days between the two dates.  If Difference changes that value is used in calculations where other properties on the object are recalculated.

So what I have is a series of calculated fields that cascade if a root value is changed.

Any recommendations on how to handle this scenario?

JonnyBee replied on Wednesday, August 21, 2013

Which type of client do you use? 

Starting with CSLA 4.5 there is an advanced mode for the RuleEngine that will cascade as long as properties is changed by rules. 

You can read more details on this in my blog post:
http://jonnybekkum.wordpress.com/2012/11/07/csla-4-5-ruleengine-update/  

Remember that CascadeOnDirtyProperties is an instance flag and must be set in DataPortal_Create / DataPortal_Fetch.

Copyright (c) Marimer LLC