Fisheye: Tag 3e5776001e28222d451a3af8488ba72cef6d017f refers to a dead (removed) revision in file `Application/Ringtoets/src/Application.Ringtoets.Storage/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverConditionsCalculationCreateExtensions.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverWaveConditionsCalculationCreateExtensions.cs =================================================================== diff -u --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverWaveConditionsCalculationCreateExtensions.cs (revision 0) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/WaveImpactAsphaltCover/WaveImpactAsphaltCoverWaveConditionsCalculationCreateExtensions.cs (revision 3e5776001e28222d451a3af8488ba72cef6d017f) @@ -0,0 +1,81 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Application.Ringtoets.Storage.DbContext; +using Ringtoets.WaveImpactAsphaltCover.Data; +using Ringtoets.HydraRing.Data; + +namespace Application.Ringtoets.Storage.Create.WaveImpactAsphaltCover +{ + /// + /// Extension methods for related to creating a + /// . + /// + internal static class WaveImpactAsphaltCoverWaveConditionsCalculationCreateExtensions + { + /// + /// Creates a based on the information of the + /// . + /// + /// The calculation to create a database entity for. + /// The object keeping track of create operations. + /// The index at which resides within its parent. + /// A new . + /// Thrown when is null. + internal static WaveImpactAsphaltCoverWaveConditionsCalculationEntity Create(this WaveImpactAsphaltCoverWaveConditionsCalculation calculation, + PersistenceRegistry registry, int order) + { + if (registry == null) + { + throw new ArgumentNullException("registry"); + } + + var entity = new WaveImpactAsphaltCoverWaveConditionsCalculationEntity + { + Order = order, + Name = calculation.Name.DeepClone(), + Comments = calculation.Comments.DeepClone(), + Orientation = calculation.InputParameters.Orientation, + UseBreakWater = Convert.ToByte(calculation.InputParameters.UseBreakWater), + BreakWaterType = (byte)calculation.InputParameters.BreakWater.Type, + BreakWaterHeight = calculation.InputParameters.BreakWater.Height, + UseForeshore = Convert.ToByte(calculation.InputParameters.UseForeshore), + UpperBoundaryRevetment = calculation.InputParameters.UpperBoundaryRevetment, + LowerBoundaryRevetment = calculation.InputParameters.LowerBoundaryRevetment, + UpperBoundaryWaterLevels = calculation.InputParameters.UpperBoundaryWaterLevels, + LowerBoundaryWaterLevels = calculation.InputParameters.LowerBoundaryWaterLevels, + StepSize = Convert.ToByte(calculation.InputParameters.StepSize) + }; + + HydraulicBoundaryLocation hydraulicBoundaryLocation = calculation.InputParameters.HydraulicBoundaryLocation; + if (hydraulicBoundaryLocation != null) + { + entity.HydraulicLocationEntity = hydraulicBoundaryLocation.Create(registry, 0); + } + if (calculation.InputParameters.ForeshoreProfile != null) + { + entity.ForeshoreProfileEntity = calculation.InputParameters.ForeshoreProfile.Create(registry, 0); + } + return entity; + } + } +} \ No newline at end of file Index: Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.Designer.cs =================================================================== diff -u -r5cc8a49cc445a67f425ced8216c772b9170ea517 -r3e5776001e28222d451a3af8488ba72cef6d017f --- Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.Designer.cs (.../RingtoetsEntities.Designer.cs) (revision 5cc8a49cc445a67f425ced8216c772b9170ea517) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/DbContext/RingtoetsEntities.Designer.cs (.../RingtoetsEntities.Designer.cs) (revision 3e5776001e28222d451a3af8488ba72cef6d017f) @@ -1,4 +1,25 @@ -// T4 code generation is enabled for model 'D:\repos\WettelijkToetsInstrumentarium\Application\Ringtoets\src\Application.Ringtoets.Storage\DbContext\RingtoetsEntities.edmx'. +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +// T4 code generation is enabled for model 'D:\repos\WettelijkToetsInstrumentarium\Application\Ringtoets\src\Application.Ringtoets.Storage\DbContext\RingtoetsEntities.edmx'. // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer // property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model // is open in the designer. Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/CalculationGroupEntityReadExtentions.cs =================================================================== diff -u -r5cc8a49cc445a67f425ced8216c772b9170ea517 -r3e5776001e28222d451a3af8488ba72cef6d017f --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/CalculationGroupEntityReadExtentions.cs (.../CalculationGroupEntityReadExtentions.cs) (revision 5cc8a49cc445a67f425ced8216c772b9170ea517) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/CalculationGroupEntityReadExtentions.cs (.../CalculationGroupEntityReadExtentions.cs) (revision 3e5776001e28222d451a3af8488ba72cef6d017f) @@ -247,9 +247,9 @@ { sortedList.Add(calculationEntity.Order, calculationEntity); } - foreach (WaveImpactAsphaltCoverWaveConditionsCalculationEntity asphaltCoverWaveConditionsCalculationEntity in entity.WaveImpactAsphaltCoverWaveConditionsCalculationEntities) + foreach (WaveImpactAsphaltCoverWaveConditionsCalculationEntity calculationEntity in entity.WaveImpactAsphaltCoverWaveConditionsCalculationEntities) { - sortedList.Add(asphaltCoverWaveConditionsCalculationEntity.Order, asphaltCoverWaveConditionsCalculationEntity); + sortedList.Add(calculationEntity.Order, calculationEntity); } return sortedList.Values; }