NHibernate 3.2 database configuration in code?

NHibernate seems to have several new ways of matching entities in code, which is very nice, but I can not find any information about setting up database connections in code. It has been some time since I used NHibernate (version 2), and I'm used to Fluent NHibernate, which provides this feature. Is there a similar feature built into NHibernate 3.2, and if so, how to use it?

+5
source share
2 answers

I believe the new Fluent NHibernate alternative, available in version 3.2, is called the "Loquacious API". See this question here and here you can find examples here for an example on how to use it.

+4
source

You didn’t specify exactly what you want to configure, but it can turn you on. Explore with intellisense to see more options.

var config = new Configuration()
            .Proxy(p => p.ProxyFactoryFactory<NHibernate.Bytecode.DefaultProxyFactoryFactory>())
            .DataBaseIntegration(d =>
                                     {
                                         d.ConnectionString = "foo";
                                         d.Dialect<SQLiteDialect>();
                                     });
+4
source

All Articles