Advertisement
gladyssann

AccountController.cs

Jan 16th, 2018
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. [HttpPost]
  2. [ValidateAntiForgeryToken]
  3. public ActionResult CreateUser(UserModel userModel)
  4. {
  5. if (ModelState.IsValid)
  6. {
  7. IUserInterface userService = new UserBusinessLayer("sqlConn");
  8.  
  9. userService.CreateUser(new UserEntity()
  10. {
  11. username = userModel.username,
  12. password = userModel.password,
  13. email = userModel.email
  14. });
  15.  
  16. return RedirectToAction("ListUsers");
  17. }
  18.  
  19. return View();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement