you might be able to tie into the NH event listeners. You could tie
into the pre/post Insert/Update/Delete event to notify the system/UI
of record processing. This is assuming you are preforming actions on
entities one at a time.
foreach(var entity in entities)
{
       session.Save(entity);
}

if you are updating records in bulk then progress isn't exact, until
it's complete.
session.CreateQuery("update entity set [field=something] where [a
condition is met]").Execute();

How this information gets from the listener method to the UI is up to
you.

On Oct 26, 11:02 am, Vadgros <[email protected]> wrote:
> 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.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to