Exemple #1
0
        public async Task <Review> AddLodgmentReviewAsync(int id, Review reviewModel)
        {
            var lodgment = await repository.GetLodgmentByIdAsync(id);

            if (lodgment == null)
            {
                throw new KeyNotFoundException("El hospedaje no existe.");
            }
            var review = await reviewsService.AddLodgmentReviewAsync(id, reviewModel);

            return(review);
        }