public IActionResult OnGet(int blogId)
 {
     blog = blogData.GetById(blogId);
     if (blog == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
示例#2
0
 public IActionResult OnGet(int blogId)
 {
     Blog = blogData.GetById(blogId);
     if (Blog == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     userProfile = accountData.GetById(Blog.userId);
     return(Page());
 }
示例#3
0
        public IActionResult OnGet(int blogDetailsId)
        {
            BlogDetails = _blogData.GetById(blogDetailsId);
            if (BlogDetails == null)
            {
                return(RedirectToPage("./NotFound"));
            }

            return(Page());
        }
示例#4
0
        //retrieving id from BlogDetails
        public IActionResult OnGet(int?blogDetailsId)
        {
            BlogDetails = blogDetailsId.HasValue ? _blogData.GetById(blogDetailsId.Value) : new BlogDetails();

            //if no id is found
            if (BlogDetails == null)
            {
                return(RedirectToPage("./NotFound"));
            }

            return(Page());
        }