public IActionResult KendoDestroy([DataSourceRequest] DataSourceRequest request, CoreModel model) { string deleteMessage = string.Empty; try { _service.Delete(model.CoreId); } catch (Exception ex) { deleteMessage = CommonHelper.GetErrorMessage(ex); } ModelState.Clear(); if (!string.IsNullOrEmpty(deleteMessage)) { ModelState.AddModelError(deleteMessage, deleteMessage); } return(Json(new[] { model }.ToDataSourceResult(request, ModelState))); }
public ActionResult DeleteCategory(int id) { var res = _coreService.Delete(id); return(Ok(res)); }
public void Delete(string id) { _client.Delete(id); }