Example #1
0
        public async Task AddRiderReview(RiderReviewDto riderReviewDto)
        {
            var ryderReview = new RiderReview
            {
                IdOrder   = riderReviewDto.IdOrder,
                UserName  = riderReviewDto.UserName,
                Review    = riderReviewDto.Review,
                Rating    = riderReviewDto.Rating,
                IdUser    = riderReviewDto.IdUser,
                IdRyder   = riderReviewDto.IdRider,
                RyderName = riderReviewDto.RyderName,
            };

            await this.reviewsDBContext.RidersReviews.AddAsync(ryderReview);

            this.reviewEventsManager.RiderRatingChanged(riderReviewDto.IdRider, riderReviewDto.Rating);
        }
Example #2
0
        public async Task <IActionResult> AddRyderReview(RiderReviewDto ryderReviewDto)
        {
            await this.reviewService.AddRiderReview(ryderReviewDto);

            return(Ok());
        }
Example #3
0
        public async Task <IActionResult> AddRiderReview([FromBody] RiderReviewDto riderReviewDto)
        {
            await this.reviewService.AddRiderReview(riderReviewDto);

            return(Ok());
        }