public async Task <IActionResult> OnGetAsync(int id) { tempUser = await commentService.Get(id); if (tempUser == null) { return(RedirectToPage("/NotFound")); } return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } var tempCommentOutput = await commentService.Get(id.Value); commentOutputDto = mapper.Map <CommentsOutputDto>(tempCommentOutput); if (commentOutputDto == null) { return(NotFound()); } return(Page()); }