Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
        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());
            }
        }
Exemplo n.º 3
0
        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());
        }