public ActionResult Stories_Destroy([DataSourceRequest]DataSourceRequest request, StoryAdminViewModel story) { if (this.ModelState.IsValid) { var entity = new Story { Id = story.Id, IsDeleted = true }; this.storyService.Update(entity); } return this.Json(new[] { story }.ToDataSourceResult(request, this.ModelState)); }
public ActionResult Stories_Update([DataSourceRequest]DataSourceRequest request, StoryAdminViewModel story) { if (this.ModelState.IsValid) { var entity = new Story { Id = story.Id, Name = story.Name, ModifiedOn = DateTime.Now }; this.storyService.Update(entity); } return this.Json(new[] { story }.ToDataSourceResult(request, this.ModelState)); }