Example #1
0
        public void Run(ICommand command)
        {
            ICommandHandler handler = _commandHandlerProvider.handlerFor(command);

            _transaction.begin();

            try
            {
                handler.handle(command);

                _transaction.commit();
            }
            catch (System.Exception)
            {
                _transaction.rollback();

                throw;
            }
        }