Пример #1
0
 public ActionResult Create(User user)
 {
     if(ModelState.IsValid)
     {
         userRepository.Create(user);
     }
     return View();
 }
Пример #2
0
        public ActionResult Create(User user)
        {
            if (ModelState.IsValid)
            {
                userRepository.Create(user);
                return RedirectToAction("Index");
            }

            return View();
        }
Пример #3
0
 public ActionResult Delete(User user)
 {
     userRepository.Delete(user.ID);
     return RedirectToAction("Index");
 }