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