Loquacious configuration
Loquacious configuration is the latest addition to the family of configuration options that NHibernate comes bundled with and it is the best option so far. Loquacious offers a code based and easy to infer API for configuring NHibernate. Parts of the API are also fluent which makes it less verbose to work with. Loquacious API is built by extending the programmatic configuration API and hence can be called a part of programmatic configuration. Without much ado, let's jump straight into the code:
public class LoquaciousConfiguration { private readonly ISession session; public LoquaciousConfiguration() { var config = new Configuration(); config.DataBaseIntegration(db => { db.Dialect<SQLiteDialect>(); db.Driver<SQLite20Driver>(); db.ConnectionString = "data source=:memory:"; db.ConnectionReleaseMode = ConnectionReleaseMode.OnClose; db.LogSqlInConsole = true; db.LogFormattedSql = true; }) ...