public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } comment = await pcc.GetCommentByIdAsync(id.Value); initialComment = new CommentDTO { CommentId = comment.CommentId, Text = comment.Text, PostPostId = comment.PostPostId }; if (comment == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } var comm = await pcc.GetCommentByIdAsync(id.Value); if (comm != null) { comment = new CommentDTO(); comment.CommentId = comm.CommentId; comment.PostPostId = comm.PostPostId; comment.Text = comm.Text; return(Page()); } else { return(NotFound()); } }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Comment comment = await pcc.GetCommentByIdAsync(id.Value); if (comment == null) { return(NotFound()); } CommentDTO = new CommentDTO(); CommentDTO.CommentId = comment.Id; CommentDTO.Text = comment.Text; CommentDTO.PostPostId = comment.PostPostId; return(Page()); }