コード例 #1
0
        private async Task RateStar(string NewRating)
        {
            int RatingNum = int.TryParse(NewRating, out int value) ? value : 0;

            if (RatingNum >= 1 && RatingNum <= 5)
            {
                var request = new Model.Requests.RatingsInsertRequest
                {
                    NotationId = _notationId,
                    Rating     = RatingNum
                };

                Rating = RatingNum;

                UpdateRatingStars();

                await _serviceRatings.Insert <Model.Ratings>(request, "RateNotation");
            }
        }
コード例 #2
0
 public Model.Ratings RateNotation([FromBody] Model.Requests.RatingsInsertRequest request)
 {
     return(_service.RateNotation(request));
 }