public async Task Should_Get_List_Of_Posts() { var blogId = (await _blogRepository.GetListAsync()).First().Id; var posts = await _postAppService.GetListByBlogIdAndTagNameAsync(blogId, null); posts.Items.Count.ShouldBeGreaterThan(0); }
public virtual async Task <ActionResult> OnGetAsync() { if (BlogNameControlHelper.IsProhibitedFileFormatName(BlogShortName)) { return(NotFound()); } Blog = await _blogAppService.GetByShortNameAsync(BlogShortName); Posts = (await _postAppService.GetListByBlogIdAndTagNameAsync(Blog.Id, TagName)).Items; PopularTags = (await _tagAppService.GetPopularTagsAsync(Blog.Id, new GetPopularTagsInput { ResultCount = 10, MinimumPostCount = 2 })); return(Page()); }
public Task <ListResultDto <PostWithDetailsDto> > GetListByBlogIdAndTagNameAsync(Guid blogId, string tagName) { return(_postAppService.GetListByBlogIdAndTagNameAsync(blogId, tagName)); }