取消笛卡尔积运算

This commit is contained in:
2026-07-27 22:23:08 +08:00 Unverified
parent 52e4a8a5be
commit b2de605680
3 changed files with 3 additions and 0 deletions
@@ -55,6 +55,7 @@ public sealed class ExamArrangementService(AppDbContext db)
.ThenInclude(x => x.Seats)
.Include(x => x.Rooms)
.ThenInclude(x => x.Invigilators)
.AsSplitQuery()
.FirstOrDefaultAsync(x => x.Id == planId, cancellationToken);
if (plan is null)
@@ -60,6 +60,7 @@ public sealed class ExamSignInExportJobProcessor(
.ThenBy(x => x.StartPeriod)
.ThenBy(x => x.Classroom!.Building!.Name)
.ThenBy(x => x.Classroom!.Name)
.AsSplitQuery()
.ToListAsync(stoppingToken);
var legacySessions = await db.ExamSessions.AsNoTracking()
@@ -29,6 +29,7 @@ public sealed class MakeupExamArrangementService(AppDbContext db)
.Include(x => x.Sessions)
.ThenInclude(x => x.TeachingTask)
.ThenInclude(x => x!.Course)
.AsSplitQuery()
.FirstOrDefaultAsync(x => x.Id == planId, cancellationToken);
if (plan is null)