Hi Frans,
I have 3 classes:
Ex: Customer and CustomerEntity, and AnotherCustomer
Customer maps to a different table and CustomerEntity maps to more than 1 table and differnt from Customer, AnotherCust maps to a diff table.
I need to save 3 of them in 1 trans.
CustomerEntity is Pro generated class.
Customer and ANotherCust are not a Pro genrated class.
So i am wondering what is the base way to save 3 of them in 1 trans.
This is what i am doing:
Create a SqlTrans object,
set the conn string to it,
open the conn,
call begin trans,
call Customer.SaveToDB();
call CustomeEntity.Save(true);
call AnotherCust.SaveToDB();
commit.
What i am wondering is if for some reason AnotherCust.SaveToDB() fails
will it rollback CustomerEntity.Save(true) ?
Please let me know.
Thanks.