Example #1
0
 /// <summary>
 ///   Initializes a new instance of the <see cref = "WebSessionManager" /> class.
 /// </summary>
 /// <param name = "configurationGenerator">The configuration generator.</param>
 /// <param name = "logger">The logger.</param>
 public WebSessionManager(IConfigurationGenerator configurationGenerator, ILogger logger)
 {
     this.SessionFactory = configurationGenerator.Generate().BuildSessionFactory();
     this.logger         = logger;
 }
Example #2
0
        /// <summary>Builds the NHibernate session factory.</summary>
        /// <param name="configurationGenerator">The configuration generator.</param>
        /// <returns>The session factory.</returns>
        private static ISessionFactory BuildSessionFactory(IConfigurationGenerator configurationGenerator)
        {
            FluentConfiguration configuration = configurationGenerator.Generate();

            return(configuration.BuildSessionFactory());
        }