Beispiel #1
0
 public ActionResult Edit(GolfClub golfclub)
 {
     if (ModelState.IsValid)
     {
         db.Entry(golfclub).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(golfclub);
 }
Beispiel #2
0
        public ActionResult Create(GolfClub golfclub)
        {
            if (ModelState.IsValid)
            {
                db.GolfClubs.Add(golfclub);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(golfclub);
        }