public ActionResult UserComments_Destroy([DataSourceRequest]DataSourceRequest request, UserCommentsAdminViewModel userComment) { if (this.ModelState.IsValid) { this.userCommentServices.Delete(userComment.Id); } return this.Json(new[] { userComment }.ToDataSourceResult(request, this.ModelState)); }
public ActionResult UserComments_Update([DataSourceRequest]DataSourceRequest request, UserCommentsAdminViewModel userComment) { if (this.ModelState.IsValid) { var dbUserComment = this.userCommentServices.Edit(userComment.Id, userComment.Text); } return this.Json(new[] { userComment }.ToDataSourceResult(request, this.ModelState)); }