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