Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensions.cs
===================================================================
diff -u -r6b3a6850b43d0098dcaf52c23b9a74d2e678bf8e -r25e0f6d008a17ea054a3658d82746b3a2e94f3c5
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensions.cs (.../MacroStabilityInwardsSoilLayer2DCreateExtensions.cs) (revision 6b3a6850b43d0098dcaf52c23b9a74d2e678bf8e)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/MacroStabilityInwards/MacroStabilityInwardsSoilLayer2DCreateExtensions.cs (.../MacroStabilityInwardsSoilLayer2DCreateExtensions.cs) (revision 25e0f6d008a17ea054a3658d82746b3a2e94f3c5)
@@ -36,13 +36,19 @@
/// 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 MacroStabilityInwardsSoilLayer2DEntity Create(this MacroStabilityInwardsSoilLayer2D layer,
+ /// Thrown when is null.
+ internal static MacroStabilityInwardsSoilLayer2DEntity Create(this MacroStabilityInwardsSoilLayer2D soilLayer,
int order)
{
- MacroStabilityInwardsSoilLayerProperties properties = layer.Properties;
+ if (soilLayer == null)
+ {
+ throw new ArgumentNullException(nameof(soilLayer));
+ }
+
+ MacroStabilityInwardsSoilLayerProperties properties = soilLayer.Properties;
return new MacroStabilityInwardsSoilLayer2DEntity
{
IsAquifer = Convert.ToByte(properties.IsAquifer),