var facility = new MutableConfiguration("facility");

// isWeb indicates to facility wee are in web context, so it'll use
SessionWebModule httpModule
// to setup session context for the duration of web request
facility.Attribute("isWeb", "true").CreateChild("factory").Attribute("id",
"nhibernate.factory");

container.Kernel.ConfigurationStore.AddFacilityConfiguration("nhibernate.facility",
facility);

container.AddFacility("nhibernate.facility", new NHibernateFacility(new
FluentNHibernateConfigurationBuilder()));

On Thu, Apr 30, 2009 at 3:20 AM, Yannis <[email protected]> wrote:

>
> Sorry I didnt write the way I meant to. I want to programmatically
> create an nhibernate facility.
>
> but that results to an error: The NHibernateFacility requires an
> external configuration

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to