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:
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, ...