Advertisement
gladyssann

UserController.cs(Controller)

Jan 3rd, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6. using OT_lib.BusinessLayer;
  7. using OT_lib.Entity;
  8. using OverTime.Models;
  9.  
  10.  
  11. namespace OverTime.Controllers
  12. {
  13. public class UserController : Controller
  14. {
  15. //
  16. // GET: /User/
  17. public ActionResult User()
  18. {
  19. return View();
  20. }
  21.  
  22. [HttpPost]
  23. public ActionResult User(UserModel userModel)
  24. {
  25.  
  26. UserBusinessLayer userService = new UserBusinessLayer();
  27.  
  28. userService.CreateUser(new UserEntity() {
  29. username= userModel.username,
  30. email = userModel.email,
  31. password = userModel.password
  32. });
  33.  
  34. return View();
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement