示例#1
0
        public async Task Should_Get_Posts()
        {
            var posts = await _postAppService.GetPosts(new GetPostsInput());

            posts.TotalCount.ShouldBe(2);
            posts.Items.Count.ShouldBe(2);
        }
示例#2
0
        public async Task <IActionResult> OnGetAsync(Guid postId)
        {
            PostList = await postService.GetPosts();

            SpecificPost = await postService.GetSepecificPost(postId);

            CategoryName = await cateService.GetCategoryName(SpecificPost.CategoryId);

            return(Page());
        }
        public ActionResult GetPost()
        {
            var posts = AsyncHelper.RunSync(() => _postAppService.GetPosts(CultureInfo.CurrentUICulture.Name));

            return(View(posts));
        }
示例#4
0
        public async Task <IActionResult> OnGetAsync()
        {
            PostList = await postService.GetPosts();

            return(Page());
        }