예제 #1
0
        public async Task <ICompletePost> Get(Guid Id)
        {
            logger.LogInformation($"Get Post by Id:  {Id}");
            var articleService  = new ArticleService(ctx, opts, logger);
            var tagService      = new TagService(ctx, opts, logger, opts[StorageList.TagTable], opts[StorageList.TagQueue]);
            var categoryService = new CategoryService(ctx, opts, logger, opts[StorageList.CategoryTable], opts[StorageList.CategoryQueue]);

            var post = await articleService.Get(Id);

            var tags = await tagService.Get(Id);

            var categories = await categoryService.Get(Id);

            return(new CompleteBlogEntry(post, tags, categories));
        }
예제 #2
0
        public async Task <ICompletePost> Get(string Url)
        {
            logger.LogInformation($"Get Post by Url:  {Url}");
            var articleService = new ArticleService(ctx, opts, logger);

            var tagService      = new TagService(ctx, opts, logger, opts[StorageList.TagTable], opts[StorageList.TagQueue]);
            var categoryService = new CategoryService(ctx, opts, logger, opts[StorageList.CategoryTable], opts[StorageList.CategoryQueue]);

            var post = await articleService.GetByUrl(Url);

            var tags = await tagService.Get(post.Id);

            var cats = await categoryService.Get(post.Id);

            return(new CompleteBlogEntry(post, tags, cats));
        }