//// GET: Carreras/Delete/5 public ActionResult Delete(int id) { AdmCarrera admCarrera = new AdmCarrera(); ECarrera carrera = admCarrera.BuscarId(id); if (carrera != null) { return(View(carrera)); } else { return(View("Excepcion")); } }
public ActionResult Delete(int id, Entidades.ECarrera eCarrera) { try { // TODO: Add delete logic here AdmCarrera admCarrera = new AdmCarrera(); admCarrera.BuscarId(id); bool borrar = admCarrera.Eliminar(id); if (borrar) { return(View("Borrado")); } else { return(View("Excepcion")); } } catch { return(View("Excepcion")); } }