Browse Source

Blogging module: used find instead of get when filtering posts

pull/441/head
Yunus Emre Kalkan 8 years ago
parent
commit
7a7b8e4d59
  1. 2
      modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs

2
modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs

@ -39,7 +39,7 @@ namespace Volo.Blogging.Posts
public async Task<ListResultDto<PostWithDetailsDto>> GetListByBlogIdAndTagName(Guid id, string tagName)
{
var posts = _postRepository.GetPostsByBlogId(id);
var tag = tagName.IsNullOrWhiteSpace() ? null : await _tagRepository.GetByNameAsync(tagName);
var tag = tagName.IsNullOrWhiteSpace() ? null : await _tagRepository.FindByNameAsync(tagName);
var userDictionary = new Dictionary<Guid, BlogUserDto>();
var postDtos = new List<PostWithDetailsDto>(ObjectMapper.Map<List<Post>, List<PostWithDetailsDto>>(posts));

Loading…
Cancel
Save