Beispiel #1
0
        private void UpdateNewsUrl(int newsId)
        {
            var newsItem = _newsRepository.FindBy(o => o.NewsId == newsId && !o.IsDeleted);

            newsItem.NewsUrl = _urlEngine.GenerateUrl(newsItem.NewsId, newsItem.NewsTitle, newsItem.DatePublished);
            _newsRepository.Update(newsItem);
        }
Beispiel #2
0
        private void UpdateArticleUrl(int articleId)
        {
            var articleItem = _articleItemRepository.FindBy(o => o.ArticleId == articleId && !o.IsDeleted);

            articleItem.ArticleUrl = _urlEngine.GenerateUrl(articleItem.ArticleId,
                                                            articleItem.ArticleTitle,
                                                            articleItem.DateCreated);
            _articleItemRepository.Update(articleItem);
        }
Beispiel #3
0
        private void UpdateDailyBreadUrl(int dailyBreadId)
        {
            var dailyBreadItem = _dailyBreadItemRepository.FindBy(o => o.DailyBreadId == dailyBreadId && !o.IsDeleted);
            var friendlyUrl    = _urlEngine.GenerateUrl(dailyBreadItem.DailyBreadId,
                                                        dailyBreadItem.DailyBreadTitle,
                                                        dailyBreadItem.DatePublished);

            dailyBreadItem.DailyBreadUrl = friendlyUrl;
            _dailyBreadItemRepository.Update(dailyBreadItem);
        }