Thanks for your reply you two.

I have done a quick code review already on both methods of "surfacing"
the Configuration. In both cases it appears that they require a call
to FluentConfiguration.BuildSessionFactory to have any effect. It is
only by calling BuildSessionFactory that the underlying Configuration
object gets to be configured.

I don't want to make a call to BuildSessionFactory just to get back a
Configuration object that I can use. BuildSessionFactory actually
creates the SessionFactory which I don't want FNH to do.

Am I missing something here?

Thanks
Christian

On Mar 2, 2:44 pm, Tuna Toksoz <[email protected]> wrote:
> var cfg = new Configuration();
>
> Fluently.Configure(cfg)
>   .blah();
>
> or this one
>
> Tuna 
> Toksözhttp://tunatoksoz.comhttp://turkiyealt.nethttp://twitter.com/tehlike
>
> Typos included to enhance the readers attention!
>
> On Mon, Mar 2, 2009 at 4:43 PM, James Gregory <[email protected]>wrote:
>
>
>
> > You can pass a Configuration instance into Configure, or you can use
> > ExposeConfiguration.
>
> > On 3/2/09, christianacca <[email protected]> wrote:
>
> > > I am trying to integrate FNH with the Session management functionality
> > > implemented in the uNhAddins project.
>
> > > It seems like I cannot "get at" the NH Configuration object without
> > > building the NH SessionFactory. Please correct me if that is not the
> > > case.
>
> > > Assuming I am correct, I would like to arrange responsibilities such
> > > that:
> > > 1) FNH is responsible for building up the NH Configuration object
> > > 2) the session management classes in uNhAddins create the
> > > ISessionFactory
>
> > > This would seem to be a good split of reponsibilities.
>
> > > To do this however, I need FNH to split out the responsibility of
> > > building up the Configuration object from the existing
> > > FluentConfiguration.BuildSessionFactory method. And to then "surface"
> > > the Configuration object without having to call
> > > FluentConfiguration.BuildSessionFactory.
>
> > > Thinking of possible solutions to how to "surface" the Configuration
> > > object, either:
> > > 1) create a method named PeekConfiguration that returns a configured
> > > Configuration object directly
> > > 2) define an implicit converstion operator that would "cast" an
> > > instance of FluentConfiguration to an instance of Configuration.
>
> > > The second solution seems to be more in keeping with the "Fluent"
> > > interface.
>
> > > What's your thoughts?
>
> > > I am happy to supply a patch for this.
>
> > > Thanks
> > > Christian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" 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/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to