Пример #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Пример #2
0
        /// <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;
            }
        }
Пример #3
0
 public void Dispose()
 {
     _context?.Dispose();
 }
Пример #4
0
 public void Dispose()
 {
     ctx.Dispose();
 }
Пример #5
0
 public void Dispose()
 {
     _db?.Dispose();
     _connection?.Dispose();
 }
Пример #6
0
        public static void Destroy(HotelDbContext context)
        {
            context.Database.EnsureDeleted();

            context.Dispose();
        }
 public void Dispose()
 {
     _hotelDbContext.Dispose();
     GC.SuppressFinalize(this);
 }