How to access parent properties from child business rule class

How to access parent properties from child business rule class

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


San posted on Monday, March 25, 2013

I have business rules to validate against parent properties in child business rule class but I was not sure how to access parent properties from child. Any help is really appreciated.

Thank you,

San

neo_u replied on Monday, March 25, 2013

Why don't you try to use Parent in child object?

For me it worked well.

San replied on Monday, March 25, 2013

I am new to CSLA, can you please explain how to use parent in child object?

 

neo_u replied on Monday, March 25, 2013

Then I can suggest to read the books about Csla. Because this books will explain the main idea of Csla, how to use it and main concepts...

JonnyBee replied on Monday, March 25, 2013

Hi, 

In general - you may wan to reconsider flattening your object structure or apply special handling for rechecking when the parent property is changed. 

The CSLA rule engine will re-validate affected properties or properties that has the "changed property" as an input property BUT only with the object. IE when you have dependencies on a parent property you must add code to re-validate the child properties when parent property is changed. 

I also recommend the books and videos on CSLA 4!!

Copyright (c) Marimer LLC