Exemplo n.º 1
0
        public ActionResult Create(Course course)
        {
            if (ModelState.IsValid)
            {
                db.create(course);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(course);
        }
Exemplo n.º 2
0
 public Course edit(Course course)
 {
     return new JavaScriptSerializer().Deserialize<Course>(
     new Enlace().EjecutarAccion(url + "/" + course.ID.ToString() + data, "PUT", course));
 }
Exemplo n.º 3
0
 //
 public Course create(Course courses)
 {
     return new JavaScriptSerializer().Deserialize<Course>(
     new Enlace().EjecutarAccion(url + ".json", "POST", courses));
 }
Exemplo n.º 4
0
 public ActionResult Edit(Course course)
 {
     db.edit(course);
     return View(course);
 }