// GET: Categories/Delete/5 public ActionResult Delete(int id) { try { using (ContextBll ctx = new ContextBll()) { ctx.DeleteCategories(id); } } catch (Exception ex) { ViewBag.Exception = ex; return(View("Error")); } return(RedirectToAction("Index")); }
public ActionResult Delete(int id, BusinessLogicLayer.CategorieBLL collection) { try { using (ContextBll ctx = new ContextBll()) { ctx.DeleteCategories(id); } return(RedirectToAction("Index")); } catch (Exception Ex) { ViewBag.Exception = Ex; return(View("Error")); } }