//The parameters passed here are the names of the input types and text area in GetReviewByBook public ActionResult AddReview(int id, int rating, string bookContent) { // Mapping values from Review Entity to new values in GetReviewsByBook Review review = new Review(); review.BookId = id; review.ReviewContent = bookContent; review.Created = DateTime.Now; review.Rating = rating; _reviewService.AddReview(review); return(RedirectToAction("GetReviewByBook", "Review", new { id = review.BookId })); }
public void AddReview(Review review) { _dao.AddReview(review); }