//in the con...">

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

What the code below does in NHibernate:

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

OR

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

Also, does this β€œpattern” correspond to the main project namespace in .NET or can it be the name of any business object in our application?

+3
source share
2 answers

you may have .hbm.xml files distributed over many assemblies. One way or another, NHibernate instructs where to download these files from.

+5
source

It adds all embedded resources with names ending in .hbm.xmlfrom the specified assembly in the form of mappings.

Namespaces have nothing to do with this.

+4
source

Source: https://habr.com/ru/post/1795504/


All Articles