public ActionResult Delete(string ids) { ServiceResult result = new ServiceResult(); var IdArr = ids.Split(',').Select(x => Convert.ToInt32(x)).ToList(); try { for (var i = 0; i < IdArr.Count; i++) { var model = articleCateService.Find(IdArr[i]); articleCateService.Delete(model); } LogHelper.WriteLog("删除文章分类成功"); result.Message = "删除文章分类成功!"; } catch (DbEntityValidationException ex) { result.Message = "删除文章分类错误!"; result.AddServiceError("删除文章分类错误!"); LogHelper.WriteLog("删除文章分类错误", ex); } return(Json(result, JsonRequestBehavior.AllowGet)); }