public ActionResult DeleteConfirmed(int id) { playgroup_courses playgroup_courses = db.playgroup_courses.Find(id); db.playgroup_courses.Remove(playgroup_courses); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "cous_id,cous_name")] playgroup_courses playgroup_courses) { if (ModelState.IsValid) { db.Entry(playgroup_courses).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(playgroup_courses)); }
public ActionResult Create([Bind(Include = "cous_id,cous_name")] playgroup_courses playgroup_courses) { if (ModelState.IsValid) { db.playgroup_courses.Add(playgroup_courses); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(playgroup_courses)); }
// GET: playgroup_courses/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } playgroup_courses playgroup_courses = db.playgroup_courses.Find(id); if (playgroup_courses == null) { return(HttpNotFound()); } return(View(playgroup_courses)); }