public IActionResult UpdatePassword(Admin newAdmin) { Admin currentAdmin = HttpContext.Session.GetObjectFromJson <Admin>("adminInfos"); var oldAdmin = adminDal.updatePassword(currentAdmin, newAdmin); HttpContext.Session.SetObjectAsJson("adminInfos", oldAdmin); TempData["message"] = "Şifreniz başarıyla güncellendi !"; return(RedirectToAction("Index", "Admin")); }