I used TransactionScope in the past with client applications to work with the rollback of an incomplete multistage transaction. This approach is unlikely to work in a web application.
Can someone suggest ways that you can follow several steps on multiple pages to roll back if the whole process is not completed? (their browser crashes or they close the browser in the middle process, for example)
Of course, I could write some temporary table, and then transfer the final record to the real table in one transaction, but this risks the conditions of the race. I would like to start a transaction, serve several pages, each page writes part of the transaction to the table (s), then completes the transaction with a commit, and if the transaction is not completed, then it is rolled back when the session ends.
Or am I not thinking of the right path? Suggestions?
Since I use MVC 3, EF 4.1, and Ninject, I'm not sure how this will affect the solution, but I thought I would include this information.
source share