0

I am trying to register a facility in Castle Windsor using the fluent apis (version 2.5.1). I am also trying to use a non default constructor (one that takes parameters). My current code looks like this:

  IWindsorConatiner c= new Container();
  c.AddFacility<NHibernateFacility>();

The NHibernateFacility has another constructor, how do I tell Castle to use it instead?

/Konstantin

Konstantin
  • 3,626
  • 2
  • 33
  • 45

1 Answers1

1
c.AddFacility("nh", new NHibernateFacility(...));

where "nh" is the id of the facility in the config.

Mauricio Scheffer
  • 98,863
  • 23
  • 192
  • 275