Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TransactionScope and SQL Server Locks
Message
 
À
10/04/2012 11:16:55
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
01540816
Message ID:
01542139
Vues:
47
J'aime (1)
>
>Gary says that we don't even need to use TransactionScope at all ... and he's probably correct about that. We don't really care about the SELECTs being in a Transaction at all. I think I may have done that initially since we've wrapped all our other DataAccess (against our own databases) within TransactionScopes, but perhaps we don't need it for SELECTs against our customer's database. However, even if I don't use TransactionScope in my C# code, SQL Server wraps up each of my SELECT calls in an implicit transaction anyway ... and I think the default Isolation Level there is Serializable when not specified in the SqlConnection, so if I'm going to need to change it anyway, I might as well just do it within a TransactionScope. I think Serializable will use shared locks too, right?
>

I ran across this post this morning:

http://blogs.msdn.com/b/dbrowne/archive/2010/06/03/using-new-transactionscope-considered-harmful.aspx
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform