Example #1
0
        public void Dispose()
        {
            if (_aplicationContext is not null)
            {
                _aplicationContext.Dispose();

                GC.SuppressFinalize(this);
            }
        }
Example #2
0
 public virtual void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             db.Dispose();
             userManager.Dispose();
             roleManager.Dispose();
         }
         disposed = true;
     }
 }
        public void Destroy(AplicationContext context)
        {
            context.Database.EnsureDeleted();

            context.Dispose();
        }