public bool AddRev(AddReviewToMovieId request)
        {
            if (request.ReviewContent != null && request.MovId > 0)
            {
                var mov = db.Movies.Where(a => a.MovieId == request.MovId).FirstOrDefault();

                Reviews review = new Reviews();
                review.ReviewString = request.ReviewContent;
                review.Movie        = mov;
                db.Reviews.Add(review);
                db.SaveChanges();
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
 public IActionResult AddGrade(AddReviewToMovieId data)
 {
     return(Ok(repository.AddRev(data)));
 }