Exemplo n.º 1
0
        public ActionResult Update(int ID)
        {
            var user   = _coll.GetByID(ID);
            var result = UserViewModel.ConvertModelToUserViewModel(user);

            return(View(result));
        }
Exemplo n.º 2
0
        /* 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));
        }