This commit is contained in:
2026-08-10 09:35:57 +08:00 Unverified
parent c25f16ec20
commit 4be61ab921
4 changed files with 72 additions and 30 deletions
@@ -58,9 +58,8 @@ public static class ExperimentGradeAggregationService
cancellationToken);
var requestedStudentIds = studentIds.Distinct().ToArray();
var persistedScores = await db.ExperimentCourseGrades.AsNoTracking()
.Where(x =>
x.TeachingTaskId == teachingTaskId &&
requestedStudentIds.Contains(x.StudentId))
.Where(x => x.TeachingTaskId == teachingTaskId)
.WhereIn(requestedStudentIds, x => x.StudentId)
.ToDictionaryAsync(
x => x.StudentId,
x => x.WeightedAverageScore,