コード例 #1
0
        protected async Task AddThemesAsync(ArticleModel model, string[] themes = null)
        {
            if (model.GetId() == 0)
            {
                return;
            }
            if (themes != null)
            {
                foreach (var theme in themes.Where(t => t != null))
                {
                    await _themeRepository.AddThemeToArticleAsync(model, theme);
                }
            }

            await _themeRepository.AddThemeToArticleAsync(model, model.Feed.Name);
        }