Пример #1
0
        public IActionResult SignUp(User user)
        {
            var repository = new JokesRepository(_conn);

            repository.AddUser(user);
            return(Redirect("/account/login"));
        }
Пример #2
0
        public IActionResult SignUp(User user, string password)
        {
            JokesRepository rep = new JokesRepository(_connString);

            user.PasswordHash = PasswordHelper.HashPassword(password);
            rep.AddUser(user);
            return(Redirect("/account/login"));
        }