public async Task Should_Get_List_Of_Posts()
        {
            var blogId = (await _blogRepository.GetListAsync()).First().Id;
            var posts  = await _postAppService.GetListByBlogIdAndTagName(blogId, null);

            posts.Items.Count.ShouldBeGreaterThan(0);
        }
Beispiel #2
0
        public async Task OnGetAsync()
        {
            Blog = await _blogAppService.GetByShortNameAsync(BlogShortName);

            Posts       = (await _postAppService.GetListByBlogIdAndTagName(Blog.Id, TagName)).Items;
            PopularTags = (await _tagAppService.GetPopularTags(new GetPopularTagsInput {
                ResultCount = 10, MinimumPostCount = 2
            }));
        }
Beispiel #3
0
        public virtual async Task <ActionResult> OnGetAsync()
        {
            Blog = await _blogAppService.GetByShortNameAsync(BlogShortName);

            Posts       = (await _postAppService.GetListByBlogIdAndTagName(Blog.Id, TagName)).Items;
            PopularTags = (await _tagAppService.GetPopularTags(Blog.Id, new GetPopularTagsInput {
                ResultCount = 10, MinimumPostCount = 2
            }));

            return(Page());
        }
Beispiel #4
0
        public virtual async Task <ActionResult> OnGetAsync()
        {
            if (BlogNameControlHelper.IsProhibitedFileFormatName(BlogShortName))
            {
                return(NotFound());
            }

            Blog = await _blogAppService.GetByShortNameAsync(BlogShortName);

            Posts       = (await _postAppService.GetListByBlogIdAndTagName(Blog.Id, TagName)).Items;
            PopularTags = (await _tagAppService.GetPopularTags(Blog.Id, new GetPopularTagsInput {
                ResultCount = 10, MinimumPostCount = 2
            }));

            return(Page());
        }
Beispiel #5
0
 public Task <ListResultDto <PostWithDetailsDto> > GetListByBlogIdAndTagName(Guid blogId, string tagName)
 {
     return(_postAppService.GetListByBlogIdAndTagName(blogId, tagName));
 }