Click here to Skip to main content
15,033,303 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
If I use

C++
using(Transactionscope scope = new......)
{
}


how can I use transaction scope for multiple objects?

Can I transfer scope object to object?

[Edit Keith Barrow] Formatted code and improved English a little while I was at it.
Posted
Updated 12-Apr-10 23:57pm
v3

1 solution

BulbulAhmed wrote:
how can I use transaction scope for multiple objects?

Do whatever you need to do inside the using block.


BulbulAhmed wrote:
Can I transfer scope object to object?


As long as you do it within the scope of the transaction (i.e. in the using clause). Though you can always instantiate the TransactionScope without the using clause.

This should be useful:

http://msdn.microsoft.com/en-us/library/ms172152.aspx[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900