WPF, Nhibernate v2 Session Persistence -
i have wpf application loads modules application via prism / mef. each module reference assembly created house nhibernate functionality (unit of work & repository pattern). started on first module, following questions came up:
- is common place have nhibernate session open lifetime of wpf / windows application?
- would idea share nhibernate session amongst modules or have each module create own session?
it's understanding session lightweight, opening , closing session not problem... however, if close session lose change tracking... when call save, , object same when retrieve, not want query executed.
do not have session open lifetime of wpf/windows application. have performance , memory problems if do.
it depends how these modules interact. separate systems, or need work in tandem work. if it's former, shouldn't share sessions. if it's latter, use kind of session manager can pass out current session.
Comments
Post a Comment