public ActionResult Edit(Person person) { if (ModelState.IsValid) { db.Entry(person).State = EntityState.Modified; db.SaveChanges(); return Content(Boolean.TrueString); } else { //can go into details and display the messages returned by the model. return Content("Please review your form"); } }
public ActionResult Create(Person person) { if (ModelState.IsValid) { db.Person.Add(person); db.SaveChanges(); return Content(Boolean.TrueString); } else { return Content("Please review your form"); } }