Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Update/ProjectUpdateExtensions.cs
===================================================================
diff -u -r71123d9c364c97a5ef2eec81acd1bf877a1297b0 -rae6f0c6b534ca650e160ae6d9c0bc90369d25c68
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Update/ProjectUpdateExtensions.cs (.../ProjectUpdateExtensions.cs) (revision 71123d9c364c97a5ef2eec81acd1bf877a1297b0)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Update/ProjectUpdateExtensions.cs (.../ProjectUpdateExtensions.cs) (revision ae6f0c6b534ca650e160ae6d9c0bc90369d25c68)
@@ -40,43 +40,43 @@
/// .
///
/// The project to update the database entity for.
- /// The object keeping track of update operations.
+ /// The object keeping track of update operations.
/// The context to obtain the existing entity from.
/// Thrown when either:
///
- /// - is null
+ /// - is null
/// - is null
///
- internal static void Update(this Project project, PersistenceRegistry collector, IRingtoetsEntities context)
+ internal static void Update(this Project project, PersistenceRegistry registry, IRingtoetsEntities context)
{
if (context == null)
{
throw new ArgumentNullException("context");
}
- if (collector == null)
+ if (registry == null)
{
- throw new ArgumentNullException("collector");
+ throw new ArgumentNullException("registry");
}
- var entity = ReadSingleProject(project, context);
+ ProjectEntity entity = GetCorrespondingProjectEntity(project, context);
entity.Description = project.Description;
foreach (var result in project.Items.OfType())
{
if (result.IsNew())
{
- entity.AssessmentSectionEntities.Add(result.Create(collector));
+ entity.AssessmentSectionEntities.Add(result.Create(registry));
}
else
{
- result.Update(collector, context);
+ result.Update(registry, context);
}
}
- collector.Register(entity, project);
+ registry.Register(entity, project);
}
- private static ProjectEntity ReadSingleProject(Project project, IRingtoetsEntities context)
+ private static ProjectEntity GetCorrespondingProjectEntity(Project project, IRingtoetsEntities context)
{
try
{