Listeners

MicroLite is designed to be extensible and provides 3 interfaces IDeleteListener, IInsertListener and IUpdateListener to allow custom code to be executed at various points in the Session pipeline.

It also uses them itself for some of the built in functionality, the current build of MicroLite contains the following IInsertListener which is registered by default:

Listener Behaviour
IdentifierStrategyListener If a class is mapped with IdentifierStrategy.DbGenerated or IdentifierStrategy.Sequence, it retrieves the value from the database when an object is inserted and assigns the value to the ID property before the ISession.Insert() method returns.

For further information about Listeners, see the Listeners page on the wiki.

One thought on “Listeners

  1. Pingback: Listener Performance Tweak | MicroLite ORM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s