예제 #1
0
        public static ReviewDto WriteReview(RecordingDataSet.Review review)
        {
            ReviewDto reviewDto = new ReviewDto();

            reviewDto.id            = review.Id;
            reviewDto.reviewContent = review.Content;
            reviewDto.rating        = review.Rating;
            reviewDto.reviewerName  = review.Reviewer.Name;

            return(reviewDto);
        }
예제 #2
0
        public ReviewDto AddReview(string reviewerName, string content, int rating,
                                   long recordingId)
        {
            ReviewDto reviewDto = null;

            try
            {
                reviewDto = service.AddReview(reviewerName, content, rating, recordingId);
            }
            catch (ExistingReviewException exception)
            {
                throw SoapExceptionMapper.Write(exception);
            }

            return(reviewDto);
        }
        public ReviewDto AddReview(string reviewerName, string content,
                                   int rating, long recordingId)
        {
            ReviewDto review = null;

            try
            {
                review = service.AddReview(reviewerName, content,
                                           rating, recordingId);
            }
            catch (ExistingReviewException existingReview)
            {
                throw ExistingReviewMapper.Map(existingReview);
            }

            return(review);
        }