public ActionResult DeleteConfirmed(int id) { Classse classse = db.Classse.Find(id); db.Classse.Remove(classse); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(Classse classse) { if (ModelState.IsValid) { db.Entry(classse).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(classse)); }
// // GET: /Classse/Details/5 public ActionResult Details(int id = 0) { Classse classse = db.Classse.Find(id); if (classse == null) { return(HttpNotFound()); } return(View(classse)); }
public ActionResult Create(Classse classse) { if (ModelState.IsValid) { db.Classse.Add(classse); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(classse)); }
// // GET: /Classse/Edit/5 public ActionResult Edit(int id = 0) { Classse classse = db.Classse.Find(id); if (classse == null) { return(HttpNotFound()); } var teachers = db.Teachers.ToList(); ViewBag.Teachers = teachers; return(View(classse)); }