Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ActionResult Index(UserModel usermodel)
- {
- UserBusinessLayer userService = new UserBusinessLayer("sqlconn");
- List<UserEntity> list = userService.GetAllUsers();
- List<UserModel> listModel = new List<UserModel>();
- foreach (var item in list)
- {
- listModel.Add(new UserModel() {
- email = item.email,
- password = item.password,
- username = item.username,
- usr_Id = item.usr_Id
- });
- }
- return View(listModel);
- }
Advertisement
Add Comment
Please, Sign In to add comment