public static void Committing(Action handler)
        {
            Transaction transaction = Transaction.Current;
            if (transaction == null)
            {
                throw new InvalidOperationException("No active transaction in scope");
            }

            var x = new OnTransactionCommittingHandler(handler);
            transaction.EnlistVolatile(x, EnlistmentOptions.None);
        }
        public static void Committing(Action handler)
        {
            Transaction transaction = Transaction.Current;

            if (transaction == null)
            {
                throw new InvalidOperationException("No active transaction in scope");
            }

            var x = new OnTransactionCommittingHandler(handler);

            transaction.EnlistVolatile(x, EnlistmentOptions.None);
        }