Skip to content

Instantly share code, notes, and snippets.

@kmckelvin
Created August 28, 2010 11:45
Show Gist options
  • Save kmckelvin/555046 to your computer and use it in GitHub Desktop.
Save kmckelvin/555046 to your computer and use it in GitHub Desktop.
private static ISessionFactory SessionFactory = CreateSessionFactory();
private static ISessionFactory CreateSessionFactory()
{
var config = new Configuration();
config.DataBaseIntegration(
db =>
{
db.ConnectionStringName = "MusicStoreConnection",
db.Dialect<MsSql2005Dialect>();
})
.Proxy(p => p.ProxyFactoryFactory<ProxyFactoryFactory>())
.AddAssembly(typeof (Album).Assembly);
return config.BuildSessionFactory();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment