示例#1
0
        public void AddReview(ReviewInputModel review, string userId, string reviewer)
        {
            var reviewEntity = new BookReview
            {
                Reviewer = reviewer,
                UserId   = userId,
                BookId   = review.BookId ?? default(int),
                Rating   = review.Rating ?? default(double),
                Review   = review.Review
            };

            _bookRepo.AddReview(reviewEntity);
        }
示例#2
0
 public void AddReview(ReviewInputModel review)
 {
     _bookRepo.AddReview(review);
     UpdateBookRating(review.BookId);
 }