コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }