public static UnitOfWork CreateUnitOfWork(
            this IHandler handler,
            Action <UnitOfWork, IHandler> action,
            TransactionAttribute transaction = null)
        {
            if (handler == null)
            {
                throw new ArgumentNullException(nameof(handler));
            }

            if (action == null)
            {
                throw new ArgumentNullException(nameof(action));
            }

            var parent     = handler.Resolve <UnitOfWork>();
            var unitOfWork = new UnitOfWork(parent, ForceNew, transaction, handler);

            action(unitOfWork, unitOfWork + handler);
            return(unitOfWork);
        }