Archive for October, 2007
Sunday, October 21st, 2007
How to dynamically configure NHibernate…
I really don’t like using web.config to any .xml file to configure NHibernate. So I choose to dynamically configure NHibernate and here is how I did it.
private void InitSessionFactory() {
cfg = new Configuration();
cfg.Properties[Environment.ConnectionProvider] = “NHibernate.Connection.DriverConnectionProvider”;
string connectionString = (new ConnectionInfoBuilder()).ConnectionString;
cfg.Properties[Environment.ConnectionString] = connectionString;
cfg.Properties[Environment.ConnectionDriver] = “NHibernate.Driver.SqlClientDriver”;
cfg.Properties[Environment.Dialect] = getSqlDialect(connectionString);
sessionFactory = cfg.BuildSessionFactory();
}
private string getSqlDialect(string connectionString) {
string sqlDialect = String.Empty;
bool is2005 […]
No Comments » - Posted in NHibernate by Duvall Buck
Sunday, October 21st, 2007
A 2007 Hugo award
His Majesty’s Dragon: Temeraire by Naomi Novik won a Hugo award in the Novel category. This is a story about a dragon named Temeraire and Captain Will Laurence who discovers the egg after a navel battle against the French. It is a period piece set in the time of Napoleon. While Will is a naval […]
No Comments » - Posted in Audible books by Duvall Buck
Saturday, October 20th, 2007
I’ve fallen off the blogging bandwagon…
Over the last month or six weeks I have gotten much to do at work and little time to spend on blogging. I just passed through a period of trying to use an immature company-grown framework to deliver my task. This turned out to be unsuccessful. In time it will be successful but right now […]