예제 #1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                filmRepository?.Dispose();
                filmSuperheroesRepository?.Dispose();

                db?.Dispose();
            }
            base.Dispose(disposing);
        }
예제 #2
0
 private void DoDispose(bool suppressFinilize)
 {
     if (!_isDisposed)
     {
         _isDisposed = true;
         _filmRepository.Dispose();
         if (suppressFinilize)
         {
             GC.SuppressFinalize(this);
         }
     }
 }