protected override void Dispose(bool disposing) { if (disposing) { filmRepository?.Dispose(); filmSuperheroesRepository?.Dispose(); db?.Dispose(); } base.Dispose(disposing); }
private void DoDispose(bool suppressFinilize) { if (!_isDisposed) { _isDisposed = true; _filmRepository.Dispose(); if (suppressFinilize) { GC.SuppressFinalize(this); } } }