public ActionResult Update(int ID) { var user = _coll.GetByID(ID); var result = UserViewModel.ConvertModelToUserViewModel(user); return(View(result)); }
/* INDEX ------------------------------------------- INDEX ------------------------------------------------------ INDEX --------------------------------------------------- INDEX ------------------------------------ INDEX*/ public IActionResult Index() { var all = _coll.GetUsers(); userviews = new List <UserViewModel>(); foreach (var user in all) { userviews.Add(UserViewModel.ConvertModelToUserViewModel(user)); } return(View(userviews)); }