public ActionResult Edit(Fixture fixture) { if (ModelState.IsValid) { context.Entry(fixture).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } return View(fixture); }
public ActionResult Create(Fixture fixture) { if (ModelState.IsValid) { context.Fixtures.Add(fixture); context.SaveChanges(); return RedirectToAction("Index"); } return View(fixture); }