I want to use the scoped life styles in winforms in conjunction to the Repository & Unit Of Work implementations with Nhibernate. i.e get windsor to new up the form and inject the defined repositories and have them all share the same unit of work.
My thinking was that I can call the begin scope prior to new'ing the form and store the IDisposable and release when the form is closed. Then when each form is opened a new Begin Scope is called. Does this sound viable ? There is a problem though - if form 1 is opened and then form 2 is opened the latest begin scope would be owned by form 2. If the resolve method was called from form 1 (say button click) then the UoW would be associated with Form 2's scope ... this correct ? Are there any suggestions how I can achieve what I am trying to do ? -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/castle-project-users/-/ZEWZhRbOHjUJ. 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/castle-project-users?hl=en.
