public IActionResult OnPost() { if (!ModelState.IsValid) { return(Page()); } else { postData.Add(Post); } postData.Commit(); TempData["Message"] = "Post Saved!"; return(RedirectToPage("/Comment", new { postId = Post.Id })); }