public async Task <ActionResult> AddCommentAsync([FromRoute] string articleId, [FromBody] Comment comment) { if (articleId is null) { return(BadRequest(articleId)); } if (!ModelState.IsValid) { return(BadRequest(ModelState)); } comment.CreatedUser = User.Identity.Name; await _articleService.AddCommentAsync(articleId, comment); return(Ok(comment)); }