Ejemplo n.º 1
0
        public IActionResult AttemptRegister(LoginModel loginModel = null)
        {
            if (loginModel != null)
            {
                loginModel.HttpContext = httpContext;
                loginModel.AttemptRegister();

                if (loginModel.RegisterSuccess)
                {
                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(View("Index", loginModel));
                }
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }