We are using 3 layered architechture which contains SqlHelper -> DAL(Data access layer) -> BAL -> UI
Any class within a DAL can call another DAL same way any BAL can call another BAL or DAL of its own.
eg.
class Customer_DAL { display_CusDal(); }
class Customer_BAL { display_CusBal(); }
class Product_DAL { display_ProDal(); }
class Product_BAL { display_ProBal(); }
display_CusDal()
{
//call display_ProDal()
//Do some work
}
display_CusDal
function should run as a transaction which intern means any insertion made within this function should be associated with transaction object.
Since display_CusDal can call display_ProDal which might or might not be inserting data in table in another transaction, so I need to handle these in transactions.
What approach should I use.