Hi,

I'm persisting several thousand objects in a batch and would like to
use IStatelessSession. However, IStatelessSession does not support
Load<T>() which slows down the construction of my objects and makes
the whole persisting process slow.

eg (not the real code!):

void AddRegion(string name, int countryId)
{
  var region = new Region();
  region.Country = _session.Load<Country>(countryId);
  region.Name = name;

  _session.Save(region);
}

Is there another way around this? Can I create the region.CountryProxy
objects another way without doing a round-trip to the database?


Thanks,
Richard
-- 
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