Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Converters/DikeAssessmentSectionEntityConverter.cs
===================================================================
diff -u -raf521f167fabb7052a06e6a3d12575d3c3f18ab4 -rd242e89e13ef602facae6a1ef91660242bcef340
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Converters/DikeAssessmentSectionEntityConverter.cs (.../DikeAssessmentSectionEntityConverter.cs) (revision af521f167fabb7052a06e6a3d12575d3c3f18ab4)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Converters/DikeAssessmentSectionEntityConverter.cs (.../DikeAssessmentSectionEntityConverter.cs) (revision d242e89e13ef602facae6a1ef91660242bcef340)
@@ -39,26 +39,14 @@
/// The to obtain the model.
/// A new instance of , based on the properties of .
/// Thrown when or is null.
- public DikeAssessmentSection ConvertEntityToModel(DikeAssessmentSectionEntity entity, Func model)
+ public DikeAssessmentSection ConvertEntityToModel(DikeAssessmentSectionEntity entity)
{
if (entity == null)
{
throw new ArgumentNullException("entity");
}
- try
- {
- if (model() == null)
- {
- throw new ArgumentNullException("model");
- }
- }
- catch (NullReferenceException)
- {
- throw new ArgumentNullException("model");
- }
-
- var dikeAssessmentSection = model();
+ var dikeAssessmentSection = new DikeAssessmentSection();
dikeAssessmentSection.StorageId = entity.DikeAssessmentSectionEntityId;
dikeAssessmentSection.Name = entity.Name ?? string.Empty;
dikeAssessmentSection.FailureMechanismContribution.Norm = entity.Norm;