예제 #1
0
        public ActionResult Logout()
        {
            CurrentSession.Clear();


            return(RedirectToAction("Index", "Home"));
        }
예제 #2
0
 /// <summary>
 /// Rollback NHibernate transaction.
 /// </summary>
 public static void RollbackTransaction()
 {
     _logger.Debug("Rollback NHibernate transaction.");
     if (CurrentSession != null && CurrentSession.Transaction.IsActive)
     {
         CurrentSession.Transaction.Rollback();
         CurrentSession.Clear();
     }
 }
예제 #3
0
파일: Nh.cs 프로젝트: mallickhruday/Spikes
 public static void FlushSessionToDbAndClear()
 {
     CurrentSession.Flush();
     if (DoNotClearSession)
     {
         return;
     }
     CurrentSession.Clear();
 }
예제 #4
0
 public static void ClearSession()
 {
     CurrentSession.Clear();
     CurrentSession.Close();
     CurrentSession.SessionFactory.Close();
     CurrentSession.Dispose();
     CurrentSession.SessionFactory.Dispose();
     mSession = null;
     GC.Collect();
     GC.WaitForPendingFinalizers();
 }
예제 #5
0
        public ActionResult Logout()
        {
            //if (Session["login"] != null)
            //{
            //    Session.RemoveAll();
            //}

            if (CurrentSession.Login != null)
            {
                CurrentSession.Clear();
            }

            return(RedirectToAction("Index"));
        }
예제 #6
0
        public ActionResult RemoveProfile()
        {
            LayerResult <NoteUser> res = um.RemoveUserById(CurrentSession.user.Id);

            if (res.Errors.Count > 0)
            {
                ErrorViewModel evm = new ErrorViewModel()
                {
                    Title          = "Profil Silenemedi..",
                    Items          = res.Errors,
                    RedirectingUrl = "/Home/ShowProfile"
                };
                return(View("Error", evm));
            }
            CurrentSession.Clear();

            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteProfile()
        {
            BusinessLayerResult <WebnoteUser> res = webnoteUserManager.RemoveUserById(CurrentSession.User.Id);

            if (res.Errors.Count > 0)
            {
                ErrorViewModel errorNotifyObj = new ErrorViewModel()
                {
                    Items          = res.Errors,
                    Title          = "Profil Silinemedi.",
                    RedirectingUrl = "/Home/ShowProfile"
                };

                return(View("Error", errorNotifyObj));
            }

            CurrentSession.Clear();

            return(RedirectToAction("Index"));
        }
예제 #8
0
 public ActionResult Logout()
 {
     CurrentSession.Clear();
     return(RedirectToAction("Account"));
 }
 public ActionResult LogoutTercuman()
 {
     CurrentSession.Clear();
     return(RedirectToAction("Index"));
 }
 public ActionResult Logout()
 {
     CurrentSession.Clear();
     CurrentSession.Abandon();
     return(RedirectToAction(nameof(Index)));
 }
예제 #11
0
 public ActionResult LogOut()
 {
     CurrentSession.Clear("loginuser");
     return(RedirectToAction("Home"));
 }