Ejemplo n.º 1
0
        public ActionResult Create(Department department)
        {
           // Thread.Sleep(2000);
                    db.Department.Add(department);
                    db.SaveChanges();

                    return Json(department, JsonRequestBehavior.AllowGet);
        }
Ejemplo n.º 2
0
      //  [ValidateAntiForgeryToken]
        public ActionResult Edit(Department department)
        {
            //Thread.Sleep(2000);
                db.Entry(department).State = EntityState.Modified;
                db.SaveChanges();

                return Json(department, JsonRequestBehavior.AllowGet);
            
        }