Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does Configuration.AddAssembly("") in NHibernate do?

Tags:

nhibernate

What does the below code actually do in NHibernate:

<mapping assembly="Sample" /> //in the config file

OR

Configuration config = new Configuration();
config.AddAssembly("Sample");   //in the code file

Also does this "Sample" correspond to the the main namespace of the Project in .NET or can it be the name of any Business Object in our application?

like image 628
Huzefa Kagdi Avatar asked Dec 28 '22 00:12

Huzefa Kagdi


1 Answers

you can have .hbm.xml files spread out to many assemblies. So either way, instructs NHibernate from where to load those files.

like image 71
Jaguar Avatar answered Dec 30 '22 14:12

Jaguar