How do I eager-load a collection of objects in Fluent nHibernate? I going to loop through the collection and at the moment I'm getting an individual database call on each loop.
I'm using the auto mapper have this override
public void Override(AutoMapping<ParticipantCompany> mapping)
{
mapping.Not.LazyLoad();
}
but it doesn't seem to work. Is there anything I should be putting in the AutoPersistanceModelGenerator
.
I have seen plenty of examples of eager-loading on child collections, but not on one single class.