public IActionResult Post([FromBody] ArticleCommentModel model) { try { if (ModelState.IsValid) { var entity = new ArticleComment { CommentText = model.CommentText, ArticleId = model.ArticleId, IsApproved = model.IsApproved }; _articleService.AddArticleComment(entity); return(Ok()); } return(new BadRequestResult()); } catch (Exception ex) { _logger.LogError(ex, ex.Message); return(StatusCode(StatusCodes.Status500InternalServerError)); } }