コード例 #1
0
 public ActionResult Signup(RegistrationViewModel userViewModel, string ReturnUrl)
 {
     try
     {
         if (ModelState.IsValid)
         {
             userViewModel.RoleId = 2;
             User user = userServices.registrationMapperFuntion(userViewModel);
             userServices.Create(user);
             Session["Url"] = ReturnUrl;
             return(RedirectToAction("Login"));
         }
         return(View());
     }
     catch (Exception e)
     {
         return(View("Error", new HandleErrorInfo(e, "Signup", "Account")));
     }
 }