public void RollbackTransaction() { var operationId = Guid.Empty; try { operationId = _diagnosticListener.WriteDbSessionRollbackBefore(this); #region Impl if (_logger.IsEnabled(LogLevel.Debug)) { _logger.LogDebug("RollbackTransaction ."); } if (Transaction == null) { if (_logger.IsEnabled(LogLevel.Warning)) { _logger.LogWarning("Before RollbackTransaction,Please BeginTransaction first!"); } _diagnosticListener.WriteDbSessionRollbackAfter(operationId, this); return; } Transaction.Rollback(); ReleaseTransaction(); Rollbacked?.Invoke(this, DbSessionEventArgs.None); #endregion _diagnosticListener.WriteDbSessionRollbackAfter(operationId, this); } catch (Exception ex) { _diagnosticListener.WriteDbSessionRollbackError(operationId, this, ex); throw; } }
public void Rollback() { raw.Rollback(); Rollbacked?.Invoke(this, EventArgs.Empty); }
public void Rollback() { Transaction.Rollback(); Rollbacked?.Invoke(this, EventArgs.Empty); }