protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> /// <param name="disposing">The disposing</param> public virtual void Dispose(bool disposing) { if (!this.disposed) { if (disposing) { _hotelDbContext.Dispose(); } this.disposed = true; } }
public void Dispose() { _context?.Dispose(); }
public void Dispose() { ctx.Dispose(); }
public void Dispose() { _db?.Dispose(); _connection?.Dispose(); }
public static void Destroy(HotelDbContext context) { context.Database.EnsureDeleted(); context.Dispose(); }
public void Dispose() { _hotelDbContext.Dispose(); GC.SuppressFinalize(this); }