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 = PermissionsService.Find(IdArr[i]); PermissionsService.Delete(model); } LogHelper.WriteLog("删除权限成功"); result.Message = "删除权限成功!"; } catch (DbEntityValidationException ex) { result.Message = "删除权限错误!"; result.AddServiceError("删除权限错误!"); LogHelper.WriteLog("删除权限错误", ex); } return(Json(result, JsonRequestBehavior.AllowGet)); }
public IActionResult Delete(int id, [FromQuery] int permissionId) { var result = _permissionService.Delete(id, permissionId); return(Ok(result)); }
public bool Delete(string Ids) { var result = iPermissionsService.Delete(Ids); return(result); }