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"); } }
public Model.Ratings RateNotation([FromBody] Model.Requests.RatingsInsertRequest request) { return(_service.RateNotation(request)); }