public ProductManagerResultSet SubmitChanges(ClientInfo clientInfo, ProductManagerChangeSet changeSet)
        {
            var resultSet = new ProductManagerResultSet(changeSet);

            using (var transactionScope = CreateSavingTransactionScope())
            {
                using (var dataRepository = _repositoryFactory(clientInfo))
                {
                    // optional custom processing
                    PreProcessing(clientInfo, ref changeSet, dataRepository);

                    // apply chnages to repository
                    ApplyChanges(dataRepository, dataRepository.Products, changeSet, changeSet.Products, clientInfo);
                    ApplyChanges(dataRepository, dataRepository.ProductCategories, changeSet, changeSet.ProductCategories, clientInfo);

                    // optional custom processing
                    BeforeSaving(clientInfo, ref changeSet, dataRepository);

                    // save changes
                    SaveChanges(dataRepository, changeSet, resultSet);

                    // optional custom processing
                    PostProcessing(clientInfo, ref resultSet, dataRepository);
                }
                transactionScope.Complete();
            }
            return(resultSet);
        }
 partial void PostProcessing(ClientInfo clientInfo, ref ProductManagerResultSet result, IProductManagerRepository repository);