public ActionResult DeleteConfirmed(int id) { IUnidadAcademicaRepository unidadAcademicaRepository = new UnidadAcademicaRepository(); UnidadAcademica model = unidadAcademicaRepository.GetSingle(id); unidadAcademicaRepository.Delete(model); unidadAcademicaRepository.Save(); return RedirectToAction("Index"); }
// // GET: /UnidadAcademica/Delete/5 public ActionResult Delete(int id = 0) { IUnidadAcademicaRepository unidadAcademicaRepository = new UnidadAcademicaRepository(); UnidadAcademica model = unidadAcademicaRepository.GetSingle(id); if (model == null) { return HttpNotFound(); } return View(model); }