A simple command pattern implementation for transactional operations.