If it's a hard power-cut (like the battery removed on a laptop while unplugged), then there's not much you can do other than write to disk every. step. of. the. way. (Talk about a performance hit.) And also make sure that you have something recorded to let the application know when it starts back up what it was in the middle of doing before, so it can either continue, or retry the operation.
If it's a power-cut, like the power button being pressed to shutdown/sleep/hibernate the computer, then listen for the SystemEvents.PowerModeChanged event and act accordingly.
Lastly, make sure that if your data would be corrupted if halfway written to a database, make sure your database writes are atomic (either all the changes happen and are accepted, or none of them are).