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