Skip to content

Instantly share code, notes, and snippets.

@tunatoksoz
Created June 26, 2010 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tunatoksoz/454403 to your computer and use it in GitHub Desktop.
Save tunatoksoz/454403 to your computer and use it in GitHub Desktop.
var container = new WindsorContainer();
var nhfacilityRegistration = new NHFacilityRegistration(conf =>
conf
.Id("FacilityId")
.DefaultConfigurationPersister("mykey")
.AddFactory(x => x
.Alias("myAlias")
.Id("myId")
.UsingConfigurationPersister("persister")
.UsingConfigurationBuilder
<BasicConfigurationBuilderConfiguration,
DefaultConfigurationBuilder>
(
y =>
y.ConnectionDriver(
typeof(NHibernate.Driver.SqlClientDriver
))
.ConnectionString("localhost")
.Dialect(typeof(MsSql2000Dialect))
.ProxyFactory(typeof(NHibernate.ByteCode.Castle.ProxyFactoryFactory))
.Assemblies(this.GetType().Assembly)
)));
container.Register(nhfacilityRegistration);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment