Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer1DCreateExtensions.cs =================================================================== diff -u -r6b3a6850b43d0098dcaf52c23b9a74d2e678bf8e -r25e0f6d008a17ea054a3658d82746b3a2e94f3c5 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer1DCreateExtensions.cs (.../MacroStabilityInwardsSoilLayer1DCreateExtensions.cs) (revision 6b3a6850b43d0098dcaf52c23b9a74d2e678bf8e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer1DCreateExtensions.cs (.../MacroStabilityInwardsSoilLayer1DCreateExtensions.cs) (revision 25e0f6d008a17ea054a3658d82746b3a2e94f3c5) @@ -36,16 +36,22 @@ /// Creates a based on the information /// of the . /// - /// The layer to create a database entity for. + /// The soil layer to create a database entity for. /// Index at which this instance resides inside its parent container. /// A new . - internal static MacroStabilityInwardsSoilLayer1DEntity Create(this MacroStabilityInwardsSoilLayer1D layer, + /// Thrown when is null. + internal static MacroStabilityInwardsSoilLayer1DEntity Create(this MacroStabilityInwardsSoilLayer1D soilLayer, int order) { - MacroStabilityInwardsSoilLayerProperties properties = layer.Properties; + if (soilLayer == null) + { + throw new ArgumentNullException(nameof(soilLayer)); + } + + MacroStabilityInwardsSoilLayerProperties properties = soilLayer.Properties; return new MacroStabilityInwardsSoilLayer1DEntity { - Top = layer.Top.ToNaNAsNull(), + Top = soilLayer.Top.ToNaNAsNull(), IsAquifer = Convert.ToByte(properties.IsAquifer), MaterialName = properties.MaterialName.DeepClone(),