Hello, I'm building a Data Access Layer for my asp.net application. I would like to be able to share connection between different classes in order to manage transaction, but I don't know how to do that.
Example:
I have 2 classes, Order and OrderDetail.
I will call my DAL Order class for a SQL insert of a new order.
Inside the Insert method, I want to call my OrderDetail class to insert my order's details, and I would do that with same connection and transaction.
Could someone suggest me some architecture design to do that? Or maybe someone could provide some resource in internet?
I hope the example is clear, my english sucks!
Thanks.