Saturday, 20 October 2012

Transaction Scope in asp.net c#


add ddl from dialog box on right click on bin ->add refrences

using System.Transactions;


  TransactionOptions options = new TransactionOptions();
        options.IsolationLevel = System.Transactions.IsolationLevel.RepeatableRead ;
        options.Timeout = new TimeSpan(0, 5, 0);
        using (TransactionScope transactionScope = new TransactionScope(TransactionScopeOption.Required, options))
        {
            DoWork();
            transactionScope.Complete(); //Tell the transaction to commit
        }

No comments:

Post a Comment