コード例 #1
0
        public IActionResult GetComments([FromRoute] Guid articleId)
        {
            var comments = _commentLogic.GetComments(articleId);

            if (comments == null)
            {
                return(NotFound());
            }

            return(Ok(comments));
        }
コード例 #2
0
ファイル: CommentController.cs プロジェクト: Gdyku/WebApi
 public async Task <List <CommentDTO> > GetCommentsAsync()
 {
     return(await _commentLogic.GetComments());
 }