public static Story StoryInsert(Story story) { story = story.Save(); SourceRepository.SourceAdd(story.StoryId, SourceType.Story, story.StoryId.ToString()); FeedRepository.FeedAdd(FeedAction.Created, story); return story; }
public static Story StorySave(Story story) { if (!story.IsValid) { return(story); } ProjectUserRepository.AuthorizeProjectUser(story.ProjectId); Story result; if (story.IsNew) { result = StoryRepository.StoryInsert(story); } else { result = StoryRepository.StoryUpdate(story); } return(result); }