public async Task <IActionResult> OnGet()
        {
            var result = await authorization.IsGrantedAsync(blogPermissions.Post.CreatePost);

            if (result)
            {
                ListCategory = await cateAppService.GetCateList();

                return(Page());
            }
            return(RedirectToPage("/Error/AccessDenied", new { errorMesseage = "You don't have permission of Create Post!" }));
        }
        public async Task <IActionResult> OnGetAsync(Guid postId)
        {
            var result = await authorization.IsGrantedAsync(blogPermissions.Post.UpdatePost);

            if (result)
            {
                CategoryList = await cateService.GetCateList();

                UpdatedPostDto = await postService.GetUpdatedPost(postId);

                return(Page());
            }
            else
            {
                return(RedirectToPage("/Error/AccessDenied", new { errorMesseage = "You don't have permission of Update Post!" }));
            }
        }
        public async Task <IActionResult> OnGetAsync()
        {
            CategoryList = await categoryService.GetCateList();

            return(Page());
        }