Suppose we need to make a discount on goods selected in the grid. Without explicit transaction management, the code would be as follows:

    If we control transactions explicitly, we can use just one transaction for the same piece of work. For example:

    That’s it. Now only one transaction is used for the entire set of updates and there are no unnecessary commands for finding data.