For entity loading, it is easy:

public class PostLoadEventListener : IPostLoadEventListener
{
    public void OnPostLoad(PostLoadEvent @event)
    {
        ...
    }
}

You can register it through code:

cfg.EventListeners.PostLoadEventListeners = new
IPostLoadEventListener[] { new PostLoadEventListener() };

or through XML configuration:

<listener class="PostLoadEventListener, MyAssembly" type="post-load"/>


On Apr 20, 4:31 am, Guido Tapia <[email protected]> wrote:
> Hi All,
>
> I'm trying to find a way of subscribing to an event when an entity is loaded
> from the database / caches.  I would ideally like to be notified when an
> entity is loaded (Load/Get) and all queries also.  Is this possible?
>
> This is so that I can plug in a security layer right up close to the metal.
>
> Thanks All
>
> Guido

-- 
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