public JsonResult Delete(ProblemResourceGridViewModel resource, [DataSourceRequest] DataSourceRequest request) { this.Data.Resources.Delete(resource.Id); this.Data.SaveChanges(); return(Json(new[] { resource }.ToDataSourceResult(request), JsonRequestBehavior.AllowGet)); }
public JsonResult Delete(ProblemResourceGridViewModel resource, [DataSourceRequest] DataSourceRequest request) { this.problemResourcesData.DeleteById(resource.Id); return(this.Json(new[] { resource }.ToDataSourceResult(request), JsonRequestBehavior.AllowGet)); }