public void OnGet() { var tag = _tagRepo.GetSingle(Slug); if (tag != null) { TagName = tag.Name; var posts = _postTagRepo.GetPostsByTagId(tag.Id); Posts = _mapper.ProjectTo <PostViewModel>(posts).ToPaginatedList(CurrentPage, PageSize); } }
public void OnGet() { var tag = _tagRepo.GetSingle(Slug); if (tag != null) { TagName = tag.Name; var posts = _postTagRepo.GetPostsByTagId(tag.Id); Posts = _mapper.ProjectTo <PostViewModel>(posts).ToPaginatedList(CurrentPage, PageSize); } }