Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EF6 Rollback blues
Message
 
À
Tous
Information générale
Forum:
C#
Catégorie:
Entity Framework
Titre:
EF6 Rollback blues
Divers
Thread ID:
01655476
Message ID:
01655476
Vues:
59
            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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform