Основные методы
Основные методы
Основные методы
Основные методы
public IActionResult Topic(int rating, int idFanfic, int idTopic) { float averageTopicRating = RatingRepository.SetRating(idTopic, User.Identity.GetUserId(), rating); TopicRepository.SetAverageRatingById(idTopic, averageTopicRating); FanficRepository.SetAverageRatingById(idFanfic); averageTopicRating = (float)Math.Round(averageTopicRating, 1); int countRatings = RatingRepository.GetCountRatingById(idTopic); return(Json(new { averageTopicRating, countRatings })); }