Epiworx.Business.StoryRepository.StoryUpdate C# (CSharp) Method

StoryUpdate() public static method

public static StoryUpdate ( Story story ) : Story
story Story
return Story
        public static Story StoryUpdate(Story story)
        {
            if (!story.IsDirty)
            {
                return story;
            }

            story = story.Save();

            SourceRepository.SourceUpdate(story.StoryId, SourceType.Story, story.StoryId.ToString());

            FeedRepository.FeedAdd(FeedAction.Edited, story);

            return story;
        }

Usage Example

Example #1
0
        public static void StoryUpdateDuration(int storyId)
        {
            var story = StoryRepository.StoryFetch(storyId);
            var hour  = HourRepository.HourFetchInfoList(story);

            story.Duration = hour.Sum(row => row.Duration);

            StoryRepository.StoryUpdate(story);
        }
All Usage Examples Of Epiworx.Business.StoryRepository::StoryUpdate