public async Task <ActionResult> SignIn(UserMvcModel model) { IUserModel _userToLogIn = new UserModel { Username = model.Username, Password = model.Password }; var status = await _userService.GetAsync(_userToLogIn); Guid _userid = status.UserID; Session["UserID"] = _userid; return(RedirectToAction("ListChoices", "LoggedIn")); }
public async Task <ActionResult> SignUp(UserMvcModel model) { if (ModelState.IsValid) { IUserModel _userToCreate = new UserModel { Username = model.Username, Password = model.Password }; var status = await _userService.CheckAsync(_userToCreate); Guid _userid = status.UserID; this.Session["UserID"] = _userid; return(RedirectToAction("ListChoices", "LoggedIn", new { userid = _userid })); } return(View()); }