Esempio n. 1
0
 public ActionResult Edit(Club club)
 {
     if (ModelState.IsValid)
     {
         db.Entry(club).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(club);
 }
Esempio n. 2
0
        public ActionResult Create(Club club)
        {
            if (ModelState.IsValid)
            {
                db.Clubs.Add(club);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(club);
        }