Bitboxx.DNNModules.BBImageStory.Components.DbController.InsertStory C# (CSharp) Method

InsertStory() public method

public InsertStory ( StoryInfo story, int moduleId, int tabId ) : int
story Bitboxx.DNNModules.BBImageStory.Models.StoryInfo
moduleId int
tabId int
return int
        public int InsertStory(StoryInfo story, int moduleId, int tabId)
        {
            using (IDataContext ctx = DataContext.Instance())
            {
                var rep = ctx.GetRepository<StoryInfo>();
                rep.Insert(story);
                var contentItem = new ContentItem()
                                  {
                                      Content = GetStoryContent(story.StoryId),
                                      ContentTypeId = ContentTypeId,
                                      Indexed = false,
                                      ContentKey = "#view/" + story.StoryId.ToString(),
                                      ModuleID = moduleId,
                                      TabID = tabId
                                  };
                story.ContentItemID = Util.GetContentController().AddContentItem(contentItem);
                rep.Update(story);
                return story.StoryId;
            }
        }

Same methods

DbController::InsertStory ( StoryInfo story, string language, int moduleId, int tabId ) : int