Hi,
I am wondering what is a good approach to class design in the middle tier for database parent child relationships. Lets say we have to tables orders and orderitems. Should I create seperate serviced class for each table within the middle tier or should I create a master class "orders" and have all the code to ins/upd/del orders and order items with the master class.
I ask because both my middle tier classes (Data Service layer) inherit from System.EnterpriseServices.ServicedComponent and if there are two seperate class I am afraid that they might be instanciated and serviced via seperate db connections and transactions. Is this the case? If so how can two seperate serviced classes share the same db connection and transaction?
Thanks in advance for the help.
I am wondering what is a good approach to class design in the middle tier for database parent child relationships. Lets say we have to tables orders and orderitems. Should I create seperate serviced class for each table within the middle tier or should I create a master class "orders" and have all the code to ins/upd/del orders and order items with the master class.
I ask because both my middle tier classes (Data Service layer) inherit from System.EnterpriseServices.ServicedComponent and if there are two seperate class I am afraid that they might be instanciated and serviced via seperate db connections and transactions. Is this the case? If so how can two seperate serviced classes share the same db connection and transaction?
Thanks in advance for the help.