Index: Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Partials/PartialRiskeerEntities.cs =================================================================== diff -u -re945c571194873f80380cfa483d695428aa47e5e -r44fafc9375f2c7859ed724845c21b57156e1c9bd --- Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Partials/PartialRiskeerEntities.cs (.../PartialRiskeerEntities.cs) (revision e945c571194873f80380cfa483d695428aa47e5e) +++ Riskeer/Storage/src/Riskeer.Storage.Core/DbContext/Partials/PartialRiskeerEntities.cs (.../PartialRiskeerEntities.cs) (revision 44fafc9375f2c7859ed724845c21b57156e1c9bd) @@ -19,9 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.Data.Entity; -using System.Data.SQLite; namespace Riskeer.Storage.Core.DbContext { @@ -40,13 +38,6 @@ Configuration.LazyLoadingEnabled = false; } - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - - SQLiteConnectionHelper.ForcefullyDisposeSQLiteConnection(); - } - /// /// Loads all tables into the context. /// @@ -152,6 +143,13 @@ LoadIllustrationPointsIntoContext(); } + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + + SQLiteConnectionHelper.ForcefullyDisposeSQLiteConnection(); + } + private void LoadIllustrationPointsIntoContext() { FaultTreeIllustrationPointEntities.Include(ip => ip.SubMechanismIllustrationPointEntities) Index: Riskeer/Storage/src/Riskeer.Storage.Core/SQLiteConnectionHelper.cs =================================================================== diff -u -re945c571194873f80380cfa483d695428aa47e5e -r44fafc9375f2c7859ed724845c21b57156e1c9bd --- Riskeer/Storage/src/Riskeer.Storage.Core/SQLiteConnectionHelper.cs (.../SQLiteConnectionHelper.cs) (revision e945c571194873f80380cfa483d695428aa47e5e) +++ Riskeer/Storage/src/Riskeer.Storage.Core/SQLiteConnectionHelper.cs (.../SQLiteConnectionHelper.cs) (revision 44fafc9375f2c7859ed724845c21b57156e1c9bd) @@ -1,3 +1,24 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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 System.Data.SQLite; @@ -6,7 +27,7 @@ /// /// Class containing helper methods related to instances. /// - internal class SQLiteConnectionHelper + internal static class SQLiteConnectionHelper { /// /// Method for forcefully disposing any active .