Exemplo n.º 1
0
 public IActionResult Register(RegisterViewModel user)
 {
     if (ModelState.IsValid)
     {
         User this_user = UserFactory.AddWithReturn(user);
         HttpContext.Session.SetInt32("userid", this_user.id);
         return(RedirectToAction("Index", "Home"));
     }
     return(View());
 }