What I think Fabio means to say is that your session (the unit of work) is too short to be useful. In most cases, a session should last as long as the web request, or as long as a window is open, etc.
If you use this code snippet all over your application, then you are probably opening and closing the session much too often. On Sat, Jul 17, 2010 at 8:10 AM, Fabio Maulo <[email protected]> wrote: > Probably not the snippest you are looking for because nobody use such code > (or better I hope so) > > > On Sat, Jul 17, 2010 at 10:02 AM, alexey_baranov <[email protected]>wrote: > >> Hi! >> >> I'm looking for a code snippest like that >> >> using(var sess= Core.OpenSession()) >> using (var tx = sess.BeginTransaction()) >> { >> [cursor hire] >> tx.Commit(); >> } >> >> Does NHibernate community collect snippest in the Internet? >> >> 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]> >> . >> 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.
