Exemplo n.º 1
0
        public IActionResult PostComment([FromBody] CommentForCreationDto commentFromRequest)
        {
            if (commentFromRequest == null)
            {
                return(BadRequest());
            }
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            _repo.AddComment(ModelsMapping.GetCommentEntity(commentFromRequest));
            return(Ok());
        }