Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Catch 22
Message
 
 
À
03/09/2013 21:14:46
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01581904
Message ID:
01582015
Vues:
31
>>This is the something I started to read to see if I can incorporate in that particular test
>>
>>http://stackoverflow.com/questions/224689/transactions-in-net

>
>Yes, I was just about to suggest using TransactionScope ... which is mentioned in the above link. We use TransactionScope all the time. Works great. In fact, I have a blog post you might be interested in:
>
>http://geek-goddess-bonnie.blogspot.com/2010/12/transactionscope-and-sqlserver.html
>
>In the examples in my post, notice that you can do anything you want inside that TransactionScope block ... for example, call many different methods which it seems is what you want to do.
>
>~~Bonnie

Very nice article and helpful and I also checked a few StackOverflow questions and this page http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx but what I don't see is what should I do if I don't want to commit?

Say, I do want a transaction and I do want everything to happen, but at the end, I don't want to commit it. Do I simply omit scope.Complete() and expect it will be rollbacked at the end of the using statement?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform