locked
when to use TransactionScope scope? RRS feed

  • Question

  • User1215150307 posted

    1. when to use TransactionScope scope?

    2. What is distributed transaction?

    Friday, June 24, 2011 4:58 AM

Answers

All replies

  • User-837620913 posted

    TransactionScope makes a section of code "transactional."  That is, all database updates will succeed, or if one fails, all the others will be rolled back.  For a quick intro with code sample, see this blog post:  http://dotnetslackers.com/articles/ado_net/Managing_Transactions_using_TransactionScope.aspx

    A distributed transaction is an update (for example, within a transaction scope) that updates two or more different servers.  For a quick intro on distributed transactions using Microsoft's Distributed Transaction Coordinator (DTC), see this on MSDN:  http://msdn.microsoft.com/en-us/library/ms681205(v=vs.85).aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 24, 2011 6:52 AM
  • User-843484705 posted

    TransactionScope scope
    http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx

    distributed Transaction

    http://msdn.microsoft.com/en-us/library/ms188386.aspx

    Friday, June 24, 2011 8:23 AM