public ActionResult Delete([DataSourceRequest] DataSourceRequest request, CommentAdminEditInputModel model) { if (model != null) { this.comments.Delete(model.Id); } return this.Json(new[] { model }.ToDataSourceResult(request, this.ModelState)); }
public ActionResult Edit([DataSourceRequest] DataSourceRequest request, CommentAdminEditInputModel model) { if (model != null && this.ModelState.IsValid) { this.comments.Update(model.Id, model.Content); } return this.Json(new[] { model }.ToDataSourceResult(request, this.ModelState)); }