Beispiel #1
0
 public IActionResult addComment(ComentsModel review)
 {
     _iComents.addComment(review);
     return(Ok(new JsonResult("Successful")
     {
         ContentType = "Review Added Successfully", StatusCode = 400
     }));
 }
Beispiel #2
0
        public IActionResult UpdateReview(int id, ComentsModel review)
        {
            var add = _iComents.GetCommentID(id);

            if (add != null)
            {
                review.Coment_Id = add.Coment_Id;
                _iComents.UpdateComment(review);
                return(Ok(new JsonResult("Successful")
                {
                    ContentType = "Review Updated Successfully", StatusCode = 400
                }));
            }
            return(NotFound(new JsonResult("Unsuccessful")
            {
                ContentType = "Error While updating Review Found", StatusCode = 403
            }));
        }