>> I cant report the progress myself without the NH events. Why can't you use events, say Pre/Post Insert ?
On Tue, Oct 27, 2009 at 9:07 AM, Vadgros <vadg...@gmail.com> wrote: > > Hey. > > Thanks for the responses. > > Jason, if I'm doing something like: > > foreach(var entity in entities) > { > session.Save(entity); > } > > I cant report the progress myself without the NH events. > > > Fabio - The process runs on a different thread and nothing gets stuck. > However, I hate operation that take more than several seconds and > don't show the progress. If i need to save 1000 entities, I want to > know when each one was saved and let the user know as well. I don't > want to perform a foreach but use cascades. So far, interceptors is > the only way I see and I don't like it. > > On Oct 27, 7:25 am, Fabio Maulo <fabioma...@gmail.com> wrote: > > a ver... > > you have an UI issue. > > The UI hopefully is implemented using MVP. > > After that you have, probably, a service layer > > then some DAOs/Repositories > > the DAOs/Repositories is using NHibernate > > > > the solution you are looking for is ? > > and it is for ? give to the user something to watch during the save ? > > give him a link to youtube or perform the task in another thread, live > him > > continue working, and send him something when the task is done. > > > > 2009/10/26 Vadgros <vadg...@gmail.com> > > > > > > > > > > > > > > > > > Hey. > > > > > I have a scenario where I have to save lots of items to the DB and it > > > takes a while. I'd like the user to get some sort of an indication of > > > the progress being made. The easiest way to implement it is iterate > > > over the items I need to save, save each one and report the progress. > > > But I'd like to let NH do the work. > > > > > The only thing I thought of was using Interceptors (each time this > > > object gets saved fire another event if needed) but I don't think this > > > is what they were meant to do. > > > > > Am I wrong? Is there another way of doing it? > > > > > Thanks. > > > > -- > > Fabio Maulo > > > -- Sidar Ok http://www.sidarok.com http://www.twitter.com/sidarok --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---