取消笛卡尔积运算
This commit is contained in:
@@ -55,6 +55,7 @@ public sealed class ExamArrangementService(AppDbContext db)
|
|||||||
.ThenInclude(x => x.Seats)
|
.ThenInclude(x => x.Seats)
|
||||||
.Include(x => x.Rooms)
|
.Include(x => x.Rooms)
|
||||||
.ThenInclude(x => x.Invigilators)
|
.ThenInclude(x => x.Invigilators)
|
||||||
|
.AsSplitQuery()
|
||||||
.FirstOrDefaultAsync(x => x.Id == planId, cancellationToken);
|
.FirstOrDefaultAsync(x => x.Id == planId, cancellationToken);
|
||||||
|
|
||||||
if (plan is null)
|
if (plan is null)
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ public sealed class ExamSignInExportJobProcessor(
|
|||||||
.ThenBy(x => x.StartPeriod)
|
.ThenBy(x => x.StartPeriod)
|
||||||
.ThenBy(x => x.Classroom!.Building!.Name)
|
.ThenBy(x => x.Classroom!.Building!.Name)
|
||||||
.ThenBy(x => x.Classroom!.Name)
|
.ThenBy(x => x.Classroom!.Name)
|
||||||
|
.AsSplitQuery()
|
||||||
.ToListAsync(stoppingToken);
|
.ToListAsync(stoppingToken);
|
||||||
|
|
||||||
var legacySessions = await db.ExamSessions.AsNoTracking()
|
var legacySessions = await db.ExamSessions.AsNoTracking()
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public sealed class MakeupExamArrangementService(AppDbContext db)
|
|||||||
.Include(x => x.Sessions)
|
.Include(x => x.Sessions)
|
||||||
.ThenInclude(x => x.TeachingTask)
|
.ThenInclude(x => x.TeachingTask)
|
||||||
.ThenInclude(x => x!.Course)
|
.ThenInclude(x => x!.Course)
|
||||||
|
.AsSplitQuery()
|
||||||
.FirstOrDefaultAsync(x => x.Id == planId, cancellationToken);
|
.FirstOrDefaultAsync(x => x.Id == planId, cancellationToken);
|
||||||
|
|
||||||
if (plan is null)
|
if (plan is null)
|
||||||
|
|||||||
Reference in New Issue
Block a user