Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EF6 Rollback blues
Message
General information
Forum:
C#
Category:
Entity Framework
Miscellaneous
Thread ID:
01655476
Message ID:
01655478
Views:
63
>
>            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.

Did you try running SQL Profiler during the process to monitor what's going on?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform