diff --git a/src/BuildingRegistry.Projections.Integration/Building/Version/BuildingVersionExtensions.cs b/src/BuildingRegistry.Projections.Integration/Building/Version/BuildingVersionExtensions.cs index a2706ca47..f186a0aae 100644 --- a/src/BuildingRegistry.Projections.Integration/Building/Version/BuildingVersionExtensions.cs +++ b/src/BuildingRegistry.Projections.Integration/Building/Version/BuildingVersionExtensions.cs @@ -81,6 +81,7 @@ await context .Where(x => x.BuildingId == buildingId) .Include(x => x.BuildingUnits).ThenInclude(y => y.Addresses) .Include(x => x.BuildingUnits).ThenInclude(y => y.Readdresses) + .AsSplitQuery() .OrderByDescending(x => x.Position) .FirstOrDefaultAsync(ct);