Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1085727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:43:31+00:00 2026-05-16T22:43:31+00:00

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

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:43:31+00:00Added an answer on May 16, 2026 at 10:43 pm

    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).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First some brief background: I have an existing ASP.NET MVC 1 application using Entity
Background I'm working on building an ASP.Net MVC 3 application that utilizes: JQueryUI for
I have an ASP.Net MVC site that is using CEEBOX to display youtube videos
background:Me and my coworkers are working on asp.net mvc project ... we have a
Background : I have a asp.net webapplication project that should contain a public and
First some background, I am currently working on a relatively large Asp.Net MVC application
I have an ASP.NET MVC 3 (.NET 4) web application. This app fetches data
Background Information Our application reads/writes from 3 components: ASP.NET MVC 3 customer front end
I have Asp.Net MVC 3 site that has SSL on entire site. I do
Background: I am working on an ASP.NET MVC app that has 3 partials (based

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.