Exemplo n.º 1
0
        public RespositoryTestBase()
        {
            NHibernateConfiguration.Init(
                SQLiteConfiguration.Standard.UsingFile("test_GetOrganized"),
                //MsSqlConfiguration.MsSql2008.ConnectionString(
                //builder => builder.Server("localhost").Database("test_GetOrganized").TrustedConnection()),
                RebuildDatabase
                );

            session = NHibernateConfiguration.CreateAndOpenSession();
        }
Exemplo n.º 2
0
        private void InitializeNHibernate()
        {
            if (!wasNHibernateInitialized)
            {
                lock (lockObject)
                {
                    if (!wasNHibernateInitialized)
                    {
                        NHibernateConfiguration.Init(
                            SQLiteConfiguration.Standard.UsingFile("test_GetOrganized"),
                            //MsSqlConfiguration.MsSql2008.ConnectionString(
                            //builder => builder.Server("localhost").Database("test_GetOrganized").TrustedConnection()),
                            RebuildDatabase
                            );

                        wasNHibernateInitialized = true;
                    }
                }
            }
        }