2008-12-24 8 views

Répondre

8

Oui.

Il est absolument possible de les mélanger. Je le fais sur mon projet actuel.

Ma construction SessionFactory ressemble à ceci:

 _configuration = new Configuration(); 
     _configuration.SetProperties(properties); 

     // hbm files 
     _configuration.AddAssembly(typeof(ISurveyTask).Assembly); 

...

 var persistenceModel = new PersistenceModel(...) 

     // fluent mappings 
     persistenceModel.addMappingsFromAssembly(typeof(ISurveyTask).Assembly); 
     persistenceModel.Configure(_configuration); 

Profitez :-)