public ActionResult Delete(int id) { var category = service.AllList().FirstOrDefault(x => x.Id == id); if (category == null) { return(HttpNotFound()); } return(View(category)); }