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);
        }
Exemple #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
            }));
        }
Exemple #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());
        }
Exemple #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());
        }
Exemple #5
0
 public Task <ListResultDto <PostWithDetailsDto> > GetListByBlogIdAndTagName(Guid blogId, string tagName)
 {
     return(_postAppService.GetListByBlogIdAndTagName(blogId, tagName));
 }