protected override void Dispose(bool disposing) { if (currentBatch != null) { currentBatch.Dispose(); currentBatch = null; } base.Dispose(disposing); }
protected override void DoExecuteBatch(IDbCommand ps) { log.Debug("Executing batch"); CheckReaders(); Prepare(CurrentBatch.BatchCommand); int rowsAffected = CurrentBatch.ExecuteNonQuery(); Expectations.VerifyOutcomeBatched(totalExpectedRowsAffected, rowsAffected); CurrentBatch.Dispose(); totalExpectedRowsAffected = 0; currentBatch = null; }