I'd like to recommend that further discussion on this topic be moved to the NHUSERS forum which is more appropriate for its content.
Steve Bohlen [email protected] http://blog.unhandled-exceptions.com http://twitter.com/sbohlen On Tue, Jun 24, 2014 at 2:08 PM, Eric Downey <[email protected]> wrote: > Yeah, > > This is the code that entity developer genned up to provide a session: > > > //------------------------------------------------------------------------------ > // This is auto-generated code. > > //------------------------------------------------------------------------------ > // This code was generated by Entity Developer tool using the template for > generating Repositories and a Unit of Work for NHibernate model. > // Code is generated on: 6/20/2014 2:27:21 PM > // > // Changes to this file may cause incorrect behavior and will be lost if > // the code is regenerated. > > //------------------------------------------------------------------------------ > using NHibernate; > using NHibernate.Cfg; > > namespace HSC.Repository.Repositories > { > public class NHibernateSessionProvider > { > > private static Configuration configuration; > private static ISessionFactory sessionFactory; > > private NHibernateSessionProvider() > { > } > > public static Configuration Configuration > { > get > { > if (configuration == null) > { > configuration = new Configuration(); > configuration.Configure(); > } > return configuration; > } > } > > public static ISessionFactory SessionFactory > { > get > { > if (sessionFactory == null) > { > sessionFactory = Configuration.BuildSessionFactory(); > } > return sessionFactory; > } > } > > public static ISession GetSession() > { > > return SessionFactory.OpenSession(); > } > } > } > > -- > > --- > You received this message because you are subscribed to the Google Groups > "nhibernate-development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "nhibernate-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
