コード例 #1
0
        public async Task <IActionResult> Login(LoginViewModel model, string returnUrl = null)
        {
            ViewData["ReturnUrl"] = returnUrl;
            if (ModelState.IsValid)
            {
                InfoHandler getLoginInfo = new InfoHandler(_userManager, _signInManager, _userDateTime);
                await getLoginInfo.Login(model, returnUrl);

                return(RedirectToLocal(returnUrl));
            }

            // If we got this far, something failed, redisplay form
            return(View(model));
        }