Skip to content

Instantly share code, notes, and snippets.

@bojanrajkovic
Created November 8, 2010 18:31
Show Gist options
  • Save bojanrajkovic/668044 to your computer and use it in GitHub Desktop.
Save bojanrajkovic/668044 to your computer and use it in GitHub Desktop.
sessionFactory = cfg != null ? Fluently.Configure (cfg).BuildSessionFactory () :
Fluently
.Configure ()
.Database (
OracleClientConfiguration.Oracle10.ConnectionString (c => c.FromConnectionStringWithKey ("OracleConnection"))
.Cache (c => c.ProviderClass<SysCacheProvider> ().UseQueryCache ())
.AdoNetBatchSize (100))
.Mappings (m => m.FluentMappings.AddFromAssemblyOf<Models.Affiliate> ())
.ExposeConfiguration (c => { c.SetProperty ("current_session_context_class", "web"); SaveConfiguration (c); })
.BuildSessionFactory ();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment