The esTransactionScope is getting a major overhaul, I'm working on it now, it's awesome, you can do this now:
Code:
using(esTransactionScope scope1 = new esTransactionScope())
{
// esTransactionScopeOption.Required is the default
using(esTransactionScope scope2 = new esTransactionScope(esTransactionScopeOption.RequiresNew)
{
// scope2 begins a new root transaction and will complete seperate from scope1
using(esTransactionScope scope3 = new esTransactionScope()
{
// scope3 joins scope2, it's root parent
scope3.Complete();
}
scope2.complete();
}
using(esTransactionScope scope4 = new esTransactionScope(esTransactionScopeOption.Suppress)
{
// esTransactionScopeOption.Suppress means use no transaction, even if nested like this
// So anything done in here runs without a transaction
scope4.Complete();
}
scope1.Complete();
}I will be doing a blog post on some of the features rolling into es 1.6.0
As for distributed transaction, we do support them, here's how.
Just change your connection string "providerClass" from DataProvider to DataProviderEnterprise and EntitySpaces will use the Microsoft TransactionScope internally and you can as well.
EntitySpaces |
Twitter |
BLOG | Please honor our Software License