public async override Task <Guid> Execute(ReviewCreateCommand input, User?user) { await spec.CheckAndThrow((user !.Id, input.PadId)); var review = new Review(user !.Id, input.PadId, new DateTime(), input.Stars, input.Cut, input.Finish, input.Title, input.Body); await repo.Add(review); return(review.Id); }
public IActionResult CreateReview([FromBody] Review review) { Review newR = new Review { Rating = review.Rating, MediaId = review.MediaId, UserId = review.UserId, Content = review.Content }; int Reviewid = _reviewRepository.Add(newR); var newReview = _reviewRepository.GetById(Reviewid); return(CreatedAtAction(nameof(getReviewById), new { id = Reviewid }, newReview)); }
public Review Add(Review review) { var Review = _reviewRepo.Add(review); return(Review); }
public void AddReview(Review review) { _pzReviewRepo.Add(review); }