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

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

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