public IActionResult Register(UserModel model)
        {
            if (ModelState.IsValid)
            {
                model.Password = PasswordHandler.Hash(model.Password);

                if (this.UserRepository.Register(model))
                {
                    Response.Redirect("/Account/Login");
                    //return null;
                }
                else
                {
                    // Failed
                    ModelState.AddModelError("FailedToRegister", "Something went wrong.");
                }
            }

            return(View(model));
        }
 public string GetHashedPassword(string password)
 {
     return(PasswordHandler.Hash(password));
 }