I would go differently. Create a UnitOfWork class that has Begin and End methods. Then your applications can use them depending on what you want. Therefore, if you are writing a web application, you may need to start work on BeginRequest and finish work on EndRequest. If you are writing a Windows application, you can start working on the action and complete it when done.
The bottom line is that your data level and unit of work implementation should be independent of the context in which it is used.
Vadim source share