public ActionResult DeleteConfirmed(int id) { DetailDTO deletedDTO = detailService.GetDetailById(id); if (deletedDTO == null) { return(HttpNotFound()); } if (deletedDTO != null) { DetailDTO deleted = detailService.DeleteDetail(id); } return(RedirectToAction("Index")); }