public void Dispose() { if (_context != null) { _context.Dispose(); } }
private void Dispose(bool disposing) { if (!disposed && disposing) { _blogDbContext.Dispose(); } disposed = true; }
protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
protected virtual void Dispose(bool disposing) { if (!disposed) { _context.Dispose(); } disposed = true; }
public void Dispose(bool disposing) { if (disposing) { if (_context != null) { _context.Dispose(); _context = null; } } }
public virtual void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { _context.Dispose(); } this.disposed = true; } }
protected override void Dispose(bool disposing) { if (disposing) { if (db != null) { db.Dispose(); db = null; } } }
protected virtual void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { dbContext.Dispose(); } disposed = true; }
public void Dispose() { if (transaction != null) { transaction.Commit(); transaction.Dispose(); } if (dbContext != null) { dbContext.Dispose(); } }
public static void Destroy(BlogDbContext context) { context.Database.EnsureDeleted(); context.Dispose(); }
public void TearDown() { _dataContext.Dispose(); _sut = null; }
public void TearDown() { _dataContext.Dispose(); _postRepository = null; }
public void Dispose() { context.Dispose(); }
/// <summary> /// 释放资源 /// </summary> public void Dispose() { _dbContext?.Dispose(); }
public void Dispose() { _db.Dispose(); }
public void Dispose() { dbContext.Dispose(); }
public void Dispose() => _db.Dispose();