コード例 #1
0
        public async Task <double> GetAverageRatingOfPost(int postId)
        {
            var post = await _postManager.FindByIdAsync(postId);

            return(post.Evaluations.Average(x => (int)x.Value));
        }