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