private bool _disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!_disposedValue) { if (disposing) { // DbSet?.Local?.Clear(); _context?.Dispose(); // TODO: dispose managed state (managed objects). } // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. // TODO: set large fields to null. _disposedValue = true; } }
public void TearDown() { AirportInitializer.AntiSeed().Wait(); AirportDbContext.Dispose(); }
public void Dispose() { context.Dispose(); }
public void Dispose() { _dbContext.Dispose(); }