Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

What is Mapping node in NHibernate configuration and Need to keep only 1 NHibernate file

$
0
0

Can someone please explain what <mapping> node will do in the below nhibernate configuration?

There are some answers but I cannot understand clearly.

In my project there are multiple same NHiberbate configuration files exist with the only difference in assembly name in <mapping> node (SomeAssemblyName1, SomeAssemblyName2).

How can I keep only 1 NHibernate configuration supporting multiple assemblies?

1st file

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">

  <session-factory>

    <mapping assembly="SomeAssemblyName1"/>

  </session-factory>

</hibernate-configuration>

2nd file

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">

  <session-factory>

    <mapping assembly="SomeAssemblyName2"/>

  </session-factory>

</hibernate-configuration>


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>