Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/StochasticSoilModelCreateExtensions.cs =================================================================== diff -u -r01ff2c58c13df8f42661ae3e446dc2caaa94247e -r23766b602d9b509a2ffc030f284e8d5e82325a3e --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/StochasticSoilModelCreateExtensions.cs (.../StochasticSoilModelCreateExtensions.cs) (revision 01ff2c58c13df8f42661ae3e446dc2caaa94247e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/Piping/StochasticSoilModelCreateExtensions.cs (.../StochasticSoilModelCreateExtensions.cs) (revision 23766b602d9b509a2ffc030f284e8d5e82325a3e) @@ -21,10 +21,9 @@ using System; +using Application.Ringtoets.Storage.BinaryConverters; using Application.Ringtoets.Storage.DbContext; -using Core.Common.Base.Geometry; - using Ringtoets.Piping.Data; namespace Application.Ringtoets.Storage.Create.Piping @@ -55,11 +54,11 @@ var entity = new StochasticSoilModelEntity { Name = model.Name, - SegmentName = model.SegmentName + SegmentName = model.SegmentName, + SegmentPoints = new Point2DBinaryConverter().ToBytes(model.Geometry) }; AddEntitiesForStochasticSoilProfiles(model, registry, entity); - AddEntitiesForGeometryPoints(model, entity); registry.Register(entity, model); return entity; @@ -72,15 +71,5 @@ entity.StochasticSoilProfileEntities.Add(stochasticSoilProfile.Create(registry)); } } - - private static void AddEntitiesForGeometryPoints(StochasticSoilModel model, StochasticSoilModelEntity entity) - { - for (int i = 0; i < model.Geometry.Count; i++) - { - Point2D geometryPoint = model.Geometry[i]; - StochasticSoilModelSegmentPointEntity pointEntity = geometryPoint.CreateStochasticSoilModelSegmentPointEntity(i); - entity.StochasticSoilModelSegmentPointEntities.Add(pointEntity); - } - } } } \ No newline at end of file