Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EF6 Rollback blues
Message
 
To
All
General information
Forum:
C#
Category:
Entity Framework
Title:
EF6 Rollback blues
Miscellaneous
Thread ID:
01655476
Message ID:
01655476
Views:
61
            using (var txn = context.Database.BeginTransaction())
            {
                BISaveTransaction.CommitTransactions(context,rs);
                modulate();
                processTransactionHeader();
                processTransactionDetails();
                if (or.Success == false)
                {
                    Monitor.write($" ===>  Rolling back - {t.Document}" );
                    txn.Rollback();
                    return;
                }
                processRsHeaders();
                processEmHeaders();

                txn.Commit();
                th_Id = th.TransactionHeaders_Id;
            }
When or.Success returns false after process TransactionDetails, updates of OnHand fields of related tables are not rolled back.

Puzzled.

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Next
Reply
Map
View

Click here to load this message in the networking platform