Exemple #1
0
 public RepositoryNhTest()
 {
     INHibernateConfigurer config = new NHibernateConfigurer() ;
     var sessionFactory = config.BuildSessionFactory();
     IUnitOfWorkFactory uofWFactory = new UnitOfWorkFactoryNh(sessionFactory);
     this._repositoryDepartment = new RepositoryNh<Guid, Department>(uofWFactory);
 }
        public virtual void Setup()
        {
            // to always start on a clean slate
            FlowQueryHelper.ClearExpressionHandlers();

            _sessionFactory = NHibernateConfigurer.GetSessionFactory();

            OnSetup();
        }
        static BaseTest()
        {
            NHibernateConfigurer.Configure();

            Usernames = new[]
            {
                "Wimpy",
                "Empor",
                "Lajsa",
                "Izmid"
            };

            Fullnames = new[]
            {
                "Niklas Kallander",
                "Lars Wilk",
                "Kossan Muu",
                "Lotta Brak"
            };

            Firstnames = new[]
            {
                "Niklas",
                "Lars",
                "Kossan",
                "Lotta"
            };

            Lastnames = new[]
            {
                "Kallander",
                "Wilk",
                "Muu",
                "Brak"
            };

            Ids = new long[]
            {
                1,
                2,
                3,
                4
            };
        }
 public SessionProvider(NHibernateConfigurer configurer)
 {
     _sessionFactory = configurer.SetUpSessionFactory();
 }