Dear Tuna and Fabio,

Thanks a lot for your sharing, it was very helpfully to understand the
life cycle and how to handle nhibernate sessions.

But I continue with some doubt in about how to handle in a page with
ajax and more than one master-detail process. If I use session per
bussiness or session per request. What do you suggest to use? I can
save the detached objects in the asp.net session until I have the
final action to save, or it is best to only store the references (IDs)
and in every request load objects for the actions - store de the IDs -
and in the final reload objects, associate with master object, and
persist.

I have saw many samples about how to implement the session factory,
bun in the web environment we are a little lost on how to proceed.

We have a lot of Pages that has about 5 or more related persistent
classes. Until now we was saving them to the asp.net session for the
user manipulation and persist only in the final request, we are using
the session-per-request like in Nhibernate Best Practices article.
With the last research we saw some indications that we cannot save
persistent objects to the asp.net session, and the correct way to do
is to save the ids and in every request reload the objects from
nhibernate, do the action (like get the ids to associate with a master
class), save the ids in the viewstate or in the asp.net session, and
only in the final request do the session.flush o session.commit to
persist the changes.

Can you help us?

I am very interested in research and study to collaborate with the
nhibernate community. How can I start to collaborate? I will download
the source code, and start to help.

Thanks a lot and congratulations for your work, the world need
collaborative peoples like you.

On May 31, 10:13 am, Fabio Maulo <[email protected]> wrote:
> 2009/5/31 Plácido Bisneto <[email protected]>
>
> > I was reading this article but I didn't understand. What's is the 
> > problem?Should
> > I keep a Session Open until the "user-case" is finished?
> > Is there any code with sample of this pattern?
>
> Examples available in uNhAddIns for winForm, MonoRail, ASP.MVC
> --
> Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to