public async Task <IActionResult> ChangePassword(PasswordChangeViewModel model) { if (ModelState.IsValid) { model = await UsersBL.ChangePassword(_context, _userManager, User, model); if (!string.IsNullOrEmpty(model.ErrorText)) { ModelState.AddModelError("", model.ErrorText); } } return(PartialView("ChangePassword", model)); }