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); }
public async Task <IActionResult> AddRyderReview(RiderReviewDto ryderReviewDto) { await this.reviewService.AddRiderReview(ryderReviewDto); return(Ok()); }
public async Task <IActionResult> AddRiderReview([FromBody] RiderReviewDto riderReviewDto) { await this.reviewService.AddRiderReview(riderReviewDto); return(Ok()); }