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