Print Page | Close Window

TransactionSettings.Default

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3301
Printed Date: 19-Apr-2024 at 12:45pm


Topic: TransactionSettings.Default
Posted By: Sakar SR
Subject: TransactionSettings.Default
Date Posted: 25-Feb-2012 at 1:59pm
TransactionSettings.Default = new TransactionSettings(System.Transactions.IsolationLevel.ReadCommitted, new TimeSpan(0, 1, 0), false);

Let me know how to implement the above TransactionSettings for the entire application.
Please let me know where to put this code, so all further queries will work on it.

Thanks    



Replies:
Posted By: sbelini
Date Posted: 27-Feb-2012 at 1:43pm
Hi Sakar,
 
You could do it at the very beginning of your app:
 
public MainWindow() {
  TransactionSettings.Default = new TransactionSettings(System.Transactions.IsolationLevel.Chaos, new TimeSpan(0, 3, 0), true);
  InitializeComponent();
}
 
Be sure to add a reference to System.Transactions.
 
Regards,
   Silvio.


Posted By: Sakar SR
Date Posted: 28-Feb-2012 at 7:55am
thanks sbelini

thanks for your help.

Have a nice day





Print Page | Close Window