Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs =================================================================== diff -u -r5d924a3334b0532730e8ea4bd9e97a5d48a72344 -rf05b4b6bbe032a1c358f2a4ffe4f5ff6726d8000 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision 5d924a3334b0532730e8ea4bd9e97a5d48a72344) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision f05b4b6bbe032a1c358f2a4ffe4f5ff6726d8000) @@ -96,7 +96,8 @@ { foreshoreProfiles.AddRange(entity.ForeshoreProfileEntities .OrderBy(fpe => fpe.Order) - .Select(foreshoreProfileEntity => foreshoreProfileEntity.Read(collector)), + .Select(foreshoreProfileEntity => foreshoreProfileEntity.Read(collector)) + .ToArray(), foreshoreProfileSourcePath); } } @@ -140,7 +141,8 @@ { failureMechanism.StochasticSoilModels.AddRange(entity.StochasticSoilModelEntities .OrderBy(ssm => ssm.Order) - .Select(e => e.Read(collector)), + .Select(e => e.Read(collector)) + .ToArray(), stochasticSoilModelCollectionSourcePath); } @@ -149,7 +151,8 @@ { failureMechanism.SurfaceLines.AddRange(entity.SurfaceLineEntities .OrderBy(sl => sl.Order) - .Select(e => e.Read(collector)), + .Select(e => e.Read(collector)) + .ToArray(), surfaceLineCollectionSourcePath); } @@ -221,7 +224,9 @@ dikeProfiles.AddRange(entity.DikeProfileEntities .OrderBy(dp => dp.Order) - .Select(dp => dp.Read(collector)), sourcePath); + .Select(dp => dp.Read(collector)) + .ToArray(), + sourcePath); } } @@ -293,8 +298,10 @@ { if (sourcePath != null) { - heightStructures.AddRange(entity.HeightStructureEntities.OrderBy(fpe => fpe.Order) - .Select(structureEntity => structureEntity.Read(collector)), + heightStructures.AddRange(entity.HeightStructureEntities + .OrderBy(fpe => fpe.Order) + .Select(structureEntity => structureEntity.Read(collector)) + .ToArray(), sourcePath); } } @@ -466,8 +473,10 @@ { if (sourcePath != null) { - closingStructures.AddRange(entity.ClosingStructureEntities.OrderBy(fpe => fpe.Order) - .Select(structureEntity => structureEntity.Read(collector)), + closingStructures.AddRange(entity.ClosingStructureEntities + .OrderBy(fpe => fpe.Order) + .Select(structureEntity => structureEntity.Read(collector)) + .ToArray(), sourcePath); } } @@ -648,11 +657,10 @@ List locations, ReadConversionCollector collector) { - locations.AddRange( - entity - .GrassCoverErosionOutwardsHydraulicLocationEntities - .OrderBy(location => location.Order) - .Select(location => location.Read(collector))); + locations.AddRange(entity.GrassCoverErosionOutwardsHydraulicLocationEntities + .OrderBy(location => location.Order) + .Select(location => location.Read(collector)) + .ToArray()); } private static void ReadGrassCoverErosionOutwardsWaveConditionsRootCalculationGroup(CalculationGroupEntity rootCalculationGroupEntity, @@ -831,10 +839,10 @@ List locations, ReadConversionCollector collector) { - locations.AddRange( - entity.DuneLocationEntities - .OrderBy(location => location.Order) - .Select(location => location.Read(collector))); + locations.AddRange(entity.DuneLocationEntities + .OrderBy(location => location.Order) + .Select(location => location.Read(collector)) + .ToArray()); } #endregion @@ -944,7 +952,8 @@ { stabilityPointStructures.AddRange(entity.StabilityPointStructureEntities .OrderBy(fpe => fpe.Order) - .Select(structureEntity => structureEntity.Read(collector)), + .Select(structureEntity => structureEntity.Read(collector)) + .ToArray(), sourcePath); } }