Пример #1
0
        public void Sanity()
        {
            ActiveRecordStarter.Initialize(typeof(Module).Assembly, ActiveRecordSectionHandler.Instance);

            var factory = ActiveRecordMediator.GetSessionFactoryHolder().GetSessionFactory(typeof (ActiveRecordBase));
            var repo = new ModulesRepository {SessionFactory = factory};

            var session = factory.OpenSession();
            NHibernate.Context.CurrentSessionContext.Bind(session);
            repo.AllFor(2009, 1, Guid.NewGuid());
        }