public async Task <IActionResult> ChangePassword(PasswordModel model) { if (ModelState.IsValid) { try { var result = await model.ChangePasswordAsync(); if (result == true) { _logger.LogInformation(" Changed Password Successfully"); return(RedirectToAction("Index", "Dashboard")); } } catch { model.Response = new ResponseModel("Failed to Change Password", ResponseType.Failure); _logger.LogInformation("Failed to Change Password."); } } return(View(model)); }