public void Dispose() { if (_transaction != null) { _transaction.Dispose(); _transaction = null; } if (_quizRepository != null) { _quizRepository.Dispose(); _quizRepository = null; } if (_ruleRepository != null) { _ruleRepository.Dispose(); _ruleRepository = null; } if (_stageRepository != null) { _stageRepository.Dispose(); _stageRepository = null; } if (_questionRepository != null) { _questionRepository.Dispose(); _questionRepository = null; } if (_endingRepository != null) { _endingRepository.Dispose(); _endingRepository = null; } if (_fileRepository != null) { _fileRepository.Dispose(); _fileRepository = null; } if (_connection != null) { _connection.Dispose(); _connection = null; } }
public void Dispose() => questionRepo?.Dispose();