Exemple #1
0
        public SingleRsp UpdateComment(CreateCommentReq req)
        {
            var     res = new SingleRsp();
            Comment cmt = new Comment();

            cmt.Id             = req.Id;
            cmt.UserId         = req.UserId;
            cmt.ProductId      = req.ProductId;
            cmt.CommentContent = req.CommentContent;
            var m = _rep.UpdateCommon(cmt);

            res.Data = m;
            return(res);
        }
        public IActionResult UpdateCommon([FromBody] CreateCommentReq req)
        {
            var res = _svc.UpdateComment(req);

            return(Ok(res));
        }
        public IActionResult RemoveProductByModel([FromBody] CreateCommentReq req)
        {
            var res = _svc.CreateComment(req.UserId, req.ProductId, req.CommentContent);

            return(Ok(res));
        }