protected override void Dispose(bool disposing)
        {
            if (disposing && AppUserManager != null)
            {
                AppUserManager.Dispose();
            }
            if (disposing && AppRoleManager != null)
            {
                AppRoleManager.Dispose();
            }

            base.Dispose(disposing);
        }
Beispiel #2
0
 public virtual void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             userManager.Dispose();
             roleManager.Dispose();
             db.Dispose();
         }
         this.disposed = true;
     }
 }
Beispiel #3
0
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    userManager.Dispose();
                    roleManager.Dispose();
                    //clientManager
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposedValue = true;
            }
        }