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

StoryFetch() public static method

public static StoryFetch ( int storyId ) : Story
storyId int
return Story
        public static Story StoryFetch(int storyId)
        {
            var result = Story.FetchStory(
                new StoryDataCriteria
                {
                    StoryId = storyId
                });

            result.Auditor = new StoryAuditor(result.Clone());

            return result;
        }

Usage Example

        internal static void FeedAdd(string action, Note note)
        {
            var feed = FeedRepository.FeedNew(action, SourceType.Note, note.NoteId);

            switch ((SourceType)note.SourceTypeId)
            {
            case SourceType.Project:
                feed.Sources.Add(SourceType.Project, note.SourceId);
                break;

            case SourceType.Sprint:
                var sprint = SprintRepository.SprintFetch(note.SourceId);
                feed.Sources.Add(SourceType.Project, sprint.ProjectId);
                feed.Sources.Add(SourceType.Sprint, sprint.SprintId);
                break;

            case SourceType.Story:
                var story = StoryRepository.StoryFetch(note.SourceId);
                feed.Sources.Add(SourceType.Project, story.ProjectId);
                feed.Sources.Add(SourceType.Story, story.StoryId);
                break;
            }

            feed.Description = note.Body;

            feed.Save();
        }
All Usage Examples Of Epiworx.Business.StoryRepository::StoryFetch