Thanks Frans.
For creating a transaction i am thinking it may not work for my scenario as it is like this:
I have 2 sets of tables like:
Parent1
|
---------Child1
|
----------Child2
Parent2
|
---------Child1
|
----------Child2
From the above i have 6 brand new entities and inorder to save all 6 in 1 trans i can follow these approaches while saving:
Approach 1:
Parent1.Save(true);
Parent2.Save(true);
The problem with this approach is they are 2 transactions and i need it to be 1.
Approach 2:
UOW.AddForSave(Parent1,true);
UOW.AddForSave(Parent2,true);
UOW.Commit();
This will create 1 trans, so it is good.
Approach 3:
trans = new Transaction();
trans.Add(Parent1);
Parent1.Save(true);
trans.Add(Parent2);
Parent2.Save(true);
trans.commit();
This is only 1 trans right.
Thanks.