public ActionResult Logout() { CurrentSession.Clear(); return(RedirectToAction("Index", "Home")); }
/// <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(); } }
public static void FlushSessionToDbAndClear() { CurrentSession.Flush(); if (DoNotClearSession) { return; } CurrentSession.Clear(); }
public static void ClearSession() { CurrentSession.Clear(); CurrentSession.Close(); CurrentSession.SessionFactory.Close(); CurrentSession.Dispose(); CurrentSession.SessionFactory.Dispose(); mSession = null; GC.Collect(); GC.WaitForPendingFinalizers(); }
public ActionResult Logout() { //if (Session["login"] != null) //{ // Session.RemoveAll(); //} if (CurrentSession.Login != null) { CurrentSession.Clear(); } return(RedirectToAction("Index")); }
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")); }
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))); }
public ActionResult LogOut() { CurrentSession.Clear("loginuser"); return(RedirectToAction("Home")); }