On Aug 12, 2:52 pm, Fabio Maulo <[email protected]> wrote:
> 2009/8/12 joniba <[email protected]>
>
> > So first, I'd like to ask if anyone out there has implemented their
> > own lazy loading solutions using NHibernate where sessions are always
> > closed after each operation?
>
> Yes there are. In uNhAddIns José Romaniello is working on lazy-loading
> collection in a multi-physical-tear app. btw I know somebody else done it in
> the past.
>
>
OK, I will look into this project and see if I can understand the
architecture that was used for this. Thanks.
>
> > If not, is this kind of design, where an ISession is opened for each
> > CRUD operation and closed afterwards, a bad design? I don't want to
> > couple the application to NHibernate (we are actually testing it and
> > ultimately we may go with a different solution), so I can't have
> > session-management issues move outside the repositories assembly where
> > NHibernate is used.
>
> WEB or win or WPF ?
> The session management should stay out side repository as in a pure
> ADO.NETapp the connection/transaction management should stay out side
> DAO/Repository.
>
>
Part of the difficult is that the same system is supposed to support
both web and windows apps.
>
> > If it is not definitively bad, or even if it is just reasonable, then
> > I'd really like to know how others are implementing custom lazy-
> > loading when the parent objects are detached.
>
> Can't.
>
>
Can't what?
>
> > My hoped-for solution was to use a wrapper like the Lazy<T> class
> > suggested by Jeremie here:
> >http://thinkbeforecoding.com/post/2009/02/07/Lazy-load-and-persistenc...
> > .
>
> For web it is easy and you can find a lot of article about session
> management in WEB.
> For WPF, Ayende is posting a possible solution, José is posting another
> solution, Gustavo done a prj for winForm (in uNhAddIns), I have posted a
> pattern.
>
> --
> Fabio Maulo
Thanks for the names, this has given me some direction as to where to
look for what I'm searching.
Cheers
-j
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" 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/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---