public void Execute() { try { _DBReader = new DBReader(); PreTransactionBegin(_DBReader); _DBWriter = new DBWriter(); ExecuteMethods(_DBWriter); _DBWriter.Commit(); IsSuccess = true; } catch (Exception ex) { _DBWriter.Rollback(); ExceptionMsg = ex; } finally { if (_DBWriter != null) { _DBWriter.Dispose(); } } }
protected abstract void ExecuteMethods(DBWriter dBWriter);