Feature/routes export #29

Merged
gorbenko.pavel merged 13 commits from feature/routes-export into main 2026-10-14 05:06:58 +00:00
Showing only changes of commit 32fe3904e3 - Show all commits
@@ -88,6 +88,9 @@ public sealed class RouteExportService(
var routes = await db.TemplateRoutes.AsNoTracking() var routes = await db.TemplateRoutes.AsNoTracking()
.Where(x => requestTypeIds.Contains(x.RequestTypeId)) .Where(x => requestTypeIds.Contains(x.RequestTypeId))
.Include(x => x.Steps).ThenInclude(s => s.Conditions) .Include(x => x.Steps).ThenInclude(s => s.Conditions)
// Две вложенные коллекции (шаги и их условия) одним запросом дали бы декартово
// произведение строк — режем на отдельные запросы.
.AsSplitQuery()
.OrderBy(x => x.Id) .OrderBy(x => x.Id)
.ToListAsync(cancellationToken); .ToListAsync(cancellationToken);