Take the 2-minute tour ×

Background: I have an ASP.NET MVC application that wraps controller actions in a TransactionScope using an Action Filter.

Further downstream (in my infrastructure layer); I'd like to open up a new ADO.NET connection (to the same db as my outer TransactionScope, if that is relevent) and have it participate in its own transaction - without being tied to the current TransactionScope started at the controller level; how do I go about doing this?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You pass in TransactionScopeOption.RequiresNew:

TransactionOptions to = new TransactionOptions;
to.IsolationLevel = <desiredIsolationLevel>;
using (TransactionScope scope = new TransactionScope(
   TransactionScopeOption.RequiresNew, to))
  ... do work here
  scope.Complete ();

Be carefull though, there be dragons under that bridge. Specifically is easy to deadlock with yourself if the encompassing scope has pending uncommitted writes from its own transaction scope and you attempt to touch the very same entities in the inner standalone transaction (the new scope).

share|improve this answer
I'd be using ReadUncommitted; and only using this for a performance-critical read operation (basically to perform an ungodly, complex export) - so I assume it wouldn't be an issue in this specific instance, right? –  DanP Sep 24 '10 at 21:34

Your Answer


