Home > .net 2.0, .net 3.0, .net 3.5, c#, Microsoft, Oracle, Visual Studio 2008 > PersistanceConfiguration for Oracle/Fluent NHibernate

PersistanceConfiguration for Oracle/Fluent NHibernate

December 4, 2008

On Tuesday, I mentioned that I created a custom PersistanceConfiguration (based on the template for MS SQL) to connect to Oracle.  I had a few individuals email me, so I went ahead and tossed the code out on Google Code for everyone.

Feel free to download the source here.

The class derives FluentNHibernate’s PersistanceConfiguration<T> and uses the Oracle.DataAccess (ODP) driver. 

To use it, run through just like the MS SQL version.  I did, however, add an OtherOptions property to pass caching, pooling, and other Oracle-specific parameters.  I could have put each to a separate property (and may in the future)—as soon as I can get F-NHibernate fully working. Heh.  Priorities, right?

// Add our Oracle configuration to the NHibernate Config.

var oracleConfiguration = OracleConfiguration.Oracle9







      .OtherOptions(“Statement Cache Size=50;”)




  1. No comments yet.
  1. December 23, 2008 at 3:10 pm
Comments are closed.
%d bloggers like this: