public JsonResult Delete(int id) { Category s = myService.GetById(id); myService.Delete(s); myService.Commit(); return(Json("success", JsonRequestBehavior.AllowGet)); }
public DtoActionResult Delete(int id) { var result = _categoryService.Delete(id); if (result == null) { throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound)); } return(result); }