public ActionResult ShowAllUsers() { using (IPL db = new PL()) { IEnumerable <UserViewModel> users = db.GetUsers(); ICollection <UserModel> usersForShow = new List <UserModel>(); foreach (var item in users) { usersForShow.Add(new UserModel { Login = item.Login, Password = item.Password, ManagerName = db.GetManagerName(item.ManagerId) }); } ViewBag.Users = usersForShow.AsEnumerable(); } return(View()); }