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); }
public void AddReview(ReviewInputModel review) { _bookRepo.AddReview(review); UpdateBookRating(review.BookId); }