hii i am having a little problem in mapping all the entities in contained in the namespace “nhibernateTest.Domain” . it basically contains all the Map Classes like , StudentMap, DepartmentMap etc. .. now in case of normal nhibernate what we used to do is :
private ISessionFactory _sessionFactory;
private Configuration _configuration;
[TestFixtureSetUp]
public void TestFixtureSetUp()
{
_configuration = new Configuration().Configure().AddAssembly("nHibernateTest");
_sessionFactory = _configuration.BuildSessionFactory();
}
now what it used to do is . look for all the “*.hbm.xml” files in my namespace and automatically map them…
can someone tell me how to do the same for fluent nHibernate ? so that it looks for all map classes and automatically map them so that i dont have to create the session separately for diffrent Map classes ?
You would need to specify your mappings when configuring Fluent NHibernate in your application. This is typically done by
The code above is from this excellent link which talks about how to configure Fluent.