© 2026 Hedgehog Software, LLC
int hrVoteResult = 0; comment.highlightedReply = await _mapper.ProjectTo<ReplyDtoRead_2>(_db.Replies .Where(r => r.deletedStatus.body == "Default" && r.commentId == comment.id) .OrderByDescending(r => { hrVoteResult = r.Votes.Sum(v => v.body == true ? 1 : -1; return hrVoteResult; }) .Take(1)) .FirstOrDefaultAsync();
.OrderByDescending(r => r.Votes.Sum(v => v.body == true ? 1 : -1)