I have this problem that seems simple, but searched through the Internet and could not find a solution.
Problem / requirement: In my C # method
- I want to start a transaction
- Calling some business logic that ultimately updates the database with complex logic. (written by someone else)
- Check updated data in the database.
- rollback changes made in step 2 unconditionally / forcefully. (even if changes are made within the business logic)
I tried to use it System.Transactions.TransactionScope, but it cannot force the undo changes on demand. (changes are not returned when called .Dispose)
source
share