public async Task Should_Get_Posts() { var posts = await _postAppService.GetPosts(new GetPostsInput()); posts.TotalCount.ShouldBe(2); posts.Items.Count.ShouldBe(2); }
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)); }
public async Task <IActionResult> OnGetAsync() { PostList = await postService.GetPosts(); return(Page()); }