コード例 #1
0
        /// <summary>
        /// Method to delete stories
        /// </summary>
        /// <param name="storyId">Story Id</param>
        /// <returns>updated list of stories</returns>
        public ActionResult Delete(int storyId)
        {
            StoryModel story = new StoryModel(this.iStoryBaseModel);
            var        res   = story.DeleteStory(storyId);

            if (res.IsSuccess)
            {
                return(this.Json(new
                {
                    status = true,
                    message = "Story deleted successfully.",
                }));
            }
            else
            {
                return(this.Json(new
                {
                    status = false,
                    message = "Unexpected error occurred."
                }));
            }
        }