I am performing a series of steps, when I run the console application. Let's say the number of steps are 8, and it fails somewhere at the 4th step.
I wanted to be able to revert the first steps that I did before it failed. How can this be done, if it fails at any of steps?