Types from multiple assemblies and namespaces in nhibernate mapping files

You can specify the namespace and assembly to use types from the top of the HBM files:

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="MyCorp.MyAssembly" namespace="MyCorp.MyAssembly.MyNamespace">

Can you use types from multiple assemblies / namespaces inside the same mapping file, and if so, what is the syntax for this?

+5
source share
2 answers

As Ben said, you can use qualified type names.

However, a common practice in NHibernate is to put the mapping for each class in a separate file, which simplifies its support.

, (, XYHeader XYDetail).

, ( ), .

+3

HBM, , , :

Namespace.TypeName,Assembly.Name

, .

+4

All Articles