public ActionResult DeleteConfirmed(int id) { basDisciplina basdisciplina = db.Disciplinas.Find(id); db.Disciplinas.Remove(basdisciplina); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /Disciplina/Delete/5 public ActionResult Delete(int id = 0) { basDisciplina basdisciplina = db.Disciplinas.Find(id); if (basdisciplina == null) { return(HttpNotFound()); } return(View(basdisciplina)); }
public ActionResult Edit(basDisciplina basdisciplina) { if (ModelState.IsValid) { db.Entry(basdisciplina).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(basdisciplina)); }
public ActionResult Create(basDisciplina basdisciplina) { if (ModelState.IsValid) { db.Disciplinas.Add(basdisciplina); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(basdisciplina)); }