public async Task <IViewComponentResult> InvokeAsync() { var post = (Post)_siteRequest.Current.ResolvedData["blogPost"]; var blog = await _blogRepository.GetOneAsync(post.BlogId); var model = new BlogPostModel { Blog = blog, Post = post }; if (post.Tags != null && post.Tags.Any()) { var tags = await _blogTagRepository.GetTags(post.Tags); model.Tags = tags; } return(View(model)); }
public async Task <IHttpActionResult> GetTags(int blogTagId) { return(Ok(blogTagRepo.GetTags(blogTagId))); }