gladyssann

UserController.cs

Jan 5th, 2018
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public ActionResult Index(UserModel usermodel)
  2. {
  3. UserBusinessLayer userService = new UserBusinessLayer("sqlconn");
  4. List<UserEntity> list = userService.GetAllUsers();
  5. List<UserModel> listModel = new List<UserModel>();
  6.  
  7. foreach (var item in list)
  8. {
  9. listModel.Add(new UserModel() {
  10. email = item.email,
  11. password = item.password,
  12. username = item.username,
  13. usr_Id = item.usr_Id
  14.  
  15. });
  16. }
  17. return View(listModel);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment