Skip to content

Commit

Permalink
Remove NHibernate configuration cache, closes #228
Browse files Browse the repository at this point in the history
  • Loading branch information
cd21h committed Jan 18, 2021
1 parent 5d59312 commit 7477bf6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
4 changes: 0 additions & 4 deletions Src/SharpArch.Infrastructure/SharpArch.Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,5 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<Folder Include="Caching\" />
</ItemGroup>


</Project>
13 changes: 1 addition & 12 deletions Src/SharpArch.NHibernate/NHibernateSessionFactoryBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ public class NHibernateSessionFactoryBuilder
/// <summary>
/// Default NHibernate session factory key.
/// </summary>
public static readonly string DefaultConfigurationName = "nhibernate.current_session";
[NotNull] public static readonly string DefaultConfigurationName = "nhibernate.current_session";

readonly List<Assembly> _mappingAssemblies;
List<string> _additionalDependencies;

AutoPersistenceModel _autoPersistenceModel;
string _configFile;
Expand Down Expand Up @@ -67,16 +66,6 @@ public ISessionFactory BuildSessionFactory()
/// <summary>
/// Builds NHibernate configuration.
/// </summary>
/// <remarks>
/// <para>
/// Any changes made to configuration object after this point <b>will not be persisted</b> in configuration cache.
/// This can be useful to make dynamic changes to configuration or in case changes cannot be serialized
/// (e.g. event listeners are not marked with <see cref="System.SerializableAttribute" />.
/// </para>
/// <para>
/// To make persistent changes use <seealso cref="ExposeConfiguration" />.
/// </para>
/// </remarks>
/// <exception cref="InvalidOperationException">No dependencies were specified</exception>
[NotNull]
public Configuration BuildConfiguration()
Expand Down

0 comments on commit 7477bf6

Please sign in to comment.