Business rules

Business rules

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


Ash Ali posted on Tuesday, April 10, 2012

I have a few years old application written in CSLA 1.1, I have a use case implemented by a two level inheritance heirarchy, I want to add a third level inheritance object but the problem is I need every thing in 1st level Inheritance object (top most parent) and the second level ( child of level 1)except for a few business rules in level 1 and level 2, I need to "suppress" those business rules in my newly added 3rd level class.

Has someone faced the same scenario and what would be the recommended approach?

Thanks

JonnyBee replied on Tuesday, April 10, 2012

Sounds like you have another use-case and should create separate objects - and not use inheritance.

Read these posts:
http://forums.lhotka.net/forums/p/3465/17259.aspx
http://forums.lhotka.net/forums/p/9146/43449.aspx#43449

 

 

Ash Ali replied on Wednesday, April 11, 2012

Thanks Jonny, the posts you pointed out to  helped alot , I am going to normalize the common business rules into a separate base class, this will introduce another level of inheritance so another approach might be take out the common business rules from the existing base class and make them as static/shared methods (functions).

thinking it over :)

Copyright (c) Marimer LLC