Is it fine for a class in BLL to inherit a class from DAL, wouldn't I be violating some rules or something?
Printable View
Is it fine for a class in BLL to inherit a class from DAL, wouldn't I be violating some rules or something?
Business Logic Layer inherits from the Data Access layers, then there is probably something wrong with the design. If something needs to be in BLL and you already have it in DLL, then I would put those members in a base class and inherit from there rather than inheritting it from DAL.
I can understand that the basic rule in Inheritance to follow is "is-a" rule. According to OOP rule, if a class has some commonality with some other classes, you would extract that part into a base class and have this class and others inherit from it.
In this thread it used such method... :(
I think I am would or is breaking the rule that the 3 layers should totally separate from each other, thanks for the wake-up call, back to the drawing board again...