Thank you for your very quick response guys. I think i will consider the jason approach, some people call it the Session-per-request pattern am i right?
What are the pros and cons of this approach? Someone told me that using the Session-per-request you would lose some of Nhibernates benefits like the 2ndLevel cache (which currently i have no idea on how to implement nicely) Is this true? On Wed, Jan 6, 2010 at 2:48 AM, Jason Meckley <[email protected]>wrote: > +1 for Fabio. > > There are quite a few posts about this actually. Personally I don't > like the idea of long running sessions. I keep a 1:1 ratio with > requests and sessions. the request is the scope of the session. For > "long running sessions", usually associated with wizards, I use an > intermediate object which I store in session. this object contains an > aggregation of the view models for each step. only in the final step > of the wizard would I modify my entities. > > for example a simple shopping cart check out: > step 1. billing/shipping address > step 2. shipping method > step 3. confirmation > step 4. place order > > steps 1 - 3 may read data from the database, only step 4 would write > changes back to the database. > > On Jan 5, 1:17 pm, Fabio Maulo <[email protected]> wrote: > > the best way? > > find an alternative way to don't have the session in the HttpSession. > > > > 2010/1/5 reggieboy <[email protected]> > > > > > > > > > Hello guys, > > > > > I am new to nhibernate and currently learning about how to manage a > > > long-running session/conversation in an ASP.NET <http://asp.net/> MVC > app. > > > > > What is the best way to do this? > > > > > Thanks > > > > > -- > > > 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]<nhusers%[email protected]> > <nhusers%[email protected]<nhusers%[email protected]> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/nhusers?hl=en. > > > > -- > > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > > >--
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.
