Example #1
0
        public IActionResult Edit(int id, User user)
        {
            if (!ModelState.IsValid)
            {
                return(RedirectToAction("Edit", id));
            }

            context.Update(id, user);
            return(RedirectToAction("Index"));
        }