Exemple #1
0
        protected override void Load(ContainerBuilder builder)
        {
            string host     = "192.168.99.100";
            int    port     = 5432;
            string database = "postgres";
            string userName = "******";
            string password = "******";

            builder.RegisterType <TransactionInterceptor>().SingleInstance();

            builder.RegisterInstance(NhSessionFactory.Create(host, port, database, userName, password))
            .As <ISessionFactory>()
            .SingleInstance();

            builder.RegisterType <NhUnitOfWork>().As <IUnitOfWork>();
        }