Beispiel #1
0
        private void AddEntriesPost()
        {
            var entries = this.postRepository.GetAllPost().OrderByDescending(x => x.Updated);

            foreach (var entry in entries)
            {
                var siteMapPost = new SitemapItem(entry.FullUrlPost);
                siteMapPost.LastModified = entry.Updated;
                siteMapPost.Priority     = 1;
                if (!String.IsNullOrEmpty(entry.UrlImage))
                {
                    SiteMapImg img = new SiteMapImg();
                    img.img     = this.getFullPhoto(entry.UrlImage);
                    img.caption = entry.Title;

                    siteMapPost.siteMapImg = img;
                }
                _items.Add(siteMapPost);
            }
        }
Beispiel #2
0
        private void AddEntriesUser()
        {
            var entries = this.userRepository.GetAllUsersAsync();

            foreach (var entry in entries)
            {
                var siteMapPost = new SitemapItem(entry.FullUrlUser);
                siteMapPost.LastModified = entry.RegistrationDate;
                siteMapPost.Priority     = 1;
                if (!String.IsNullOrEmpty(entry.UrlImage))
                {
                    SiteMapImg img = new SiteMapImg();
                    img.img     = this.getFullPhoto(entry.UrlImage);
                    img.caption = entry.DisplayName;

                    siteMapPost.siteMapImg = img;
                }
                _items.Add(siteMapPost);
            }
        }