예제 #1
0
        public JsonResult Delete(int id)
        {
            Category s = myService.GetById(id);

            myService.Delete(s);
            myService.Commit();
            return(Json("success", JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public DtoActionResult Delete(int id)
        {
            var result = _categoryService.Delete(id);

            if (result == null)
            {
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound));
            }
            return(result);
        }