public ActionResult Delete(EIdDTO model) { if (_postService.AnyPostByCategoryId(model.Id) == false) { _categoryService.Delete(model.Id); _uow.SaveChanges(); return(Json(true, JsonRequestBehavior.AllowGet)); } else { return(Json(false, JsonRequestBehavior.AllowGet)); } }
public ActionResult Delete(EIdDTO model) { _postService.Delete(model.Id); _uow.SaveChanges(); return(Json(true, JsonRequestBehavior.AllowGet)); }