O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Transactions

When you are writing managed objects, just as with T-SQL, it’s important to be aware of the current transaction context under which your code may be running.

Managed database objects have the option of making use of the classes in the new System.Transactions namespace to control transactions. Following are the main objects you use to do this:

Image Transaction.Current—This is a static object of type Transaction that represents the current transaction. You use this object to explicitly roll back the current transaction (using Rollback()). It contains an IsolationLevel property that indicates the current transaction isolation level, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required