Beispiel #1
0
 public void Dispose()
 {
     if (_context != null)
     {
         _context.Dispose();
     }
 }
 private void Dispose(bool disposing)
 {
     if (!disposed && disposing)
     {
         _blogDbContext.Dispose();
     }
     disposed = true;
 }
Beispiel #3
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Beispiel #4
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposed)
            {
                _context.Dispose();
            }

            disposed = true;
        }
Beispiel #5
0
 public void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_context != null)
         {
             _context.Dispose();
             _context = null;
         }
     }
 }
Beispiel #6
0
 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;
         }
     }
 }
Beispiel #8
0
 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();
            }
        }
Beispiel #10
0
        public static void Destroy(BlogDbContext context)
        {
            context.Database.EnsureDeleted();

            context.Dispose();
        }
Beispiel #11
0
 public void TearDown()
 {
     _dataContext.Dispose();
     _sut = null;
 }
 public void TearDown()
 {
     _dataContext.Dispose();
     _postRepository = null;
 }
 public void Dispose()
 {
     context.Dispose();
 }
Beispiel #14
0
 /// <summary>
 /// 释放资源
 /// </summary>
 public void Dispose()
 {
     _dbContext?.Dispose();
 }
Beispiel #15
0
 public void Dispose()
 {
     _db.Dispose();
 }
Beispiel #16
0
 public void Dispose()
 {
     dbContext.Dispose();
 }
Beispiel #17
0
 public void Dispose() => _db.Dispose();