public ActionResult Destroy([DataSourceRequest] DataSourceRequest request, OlangViewModel item) { if (item != null) { repo.Destroy(item); } return(Json(new[] { item }.ToDataSourceResult(request, ModelState))); }
public ActionResult Update([DataSourceRequest] DataSourceRequest request, OlangViewModel item) { if (item != null && ModelState.IsValid) { repo.Update(item); } return(Json(new[] { item }.ToDataSourceResult(request, ModelState))); }