public JsonResult DeleteData(int?id) { if (id > 0) { db.Delete(id.Value); return(Json("success", JsonRequestBehavior.AllowGet)); } return(Json("error", JsonRequestBehavior.DenyGet)); }
// GET: Clients/Delete public ActionResult Delete(int id) { var cp = new ClientProcess(); cp.Delete(id); return(RedirectToAction("Index")); }