Пример #1
0
        public JsonResult Update(Person pers)
        {
            con.Person.Add(pers);
            con.Entry(pers).State = System.Data.Entity.EntityState.Modified;
            con.SaveChanges();

            return(Json(pers, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public JsonResult Update(Person pers)
        {
            db.People.Add(pers);
            db.Entry(pers).State = EntityState.Modified;
            db.SaveChanges();

            return(Json(pers, JsonRequestBehavior.AllowGet));
        }