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