public ActionResult DeleteConfirmed(int id) { TecsoLog tecsoLog = db.TecsoLogs.Find(id); db.TecsoLogs.Remove(tecsoLog); db.SaveChanges(); _logger.LogMessage("Se ha eliminado un Log. TecsoLogID: " + id.ToString()); return(RedirectToAction("Index")); }
public ActionResult Delete(int?id) { if (id == null) { _logger.LogError("TecsoLog/Delete requiere el id."); return(RedirectToAction("Index")); } TecsoLog tecsoLog = db.TecsoLogs.Find(id); if (tecsoLog == null) { _logger.LogError("TecsoLog/Delete InscripcionID " + id.ToString() + " inexistente."); return(RedirectToAction("Index")); } return(View(tecsoLog)); }