// GET: Categories/Delete/5 public ActionResult Delete(int id) { var category = categoryService.Get(id); if (category == null) { return(HttpNotFound()); } categoryService.Remove(id); return(RedirectToAction("Index")); }