Bulk Data Operations with NHibernate

…using ‘Stateless session’ :

http://nhforge.org/blogs/nhibernate/archive/2008/10/30/bulk-data-operations-with-nhibernate-s-stateless-sessions.aspx

The key here is that an IStatelessSession does not use the first-level cache.  Basically by default, every object that is saved or loaded through a session is cached in the first level cache.  In normal operations you want this functionality, but if you are, ie. looping through items to save, it’s better to use the stateless session

Advertisements

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