Design Patterns - Unit of Work Pattern
The Unit of Work pattern is a design pattern to group one or more operations (usually to the database) in an atomic transaction, so all of them are successfully executed or if at least one fails, no change is made.