public ActionResult Update(Person person)
 {
     using(var db = new PersonContext())
     {
         db.Persons.Attach(person);
         db.Entry(person).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
 }
 public ActionResult Insert(Person person)
 {
     if (ModelState.IsValid)
     {
         using(var db = new PersonContext())
         {
             db.Persons.Add(person);
             db.SaveChanges();
         }
         return RedirectToAction("Index");
     }
     return View();
 }