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