I need help with configuring NHibernate. In my solution has several projects: first contains the code entity, second contains the mapping files "*.hbm.xml".
I configure through code. Here it is:
Configuration config = new Configuration().
Proxy(proxy => proxy.ProxyFactoryFactory<ProxyFactoryFactory>()).
DataBaseIntegration(db =>
{
db.Dialect<MsSql2008Dialect>();
db.ConnectionString = @"Data Source=(local)\SQLEXPRESS;Initial Catalog=MyDB;Integrated Security=True;Pooling=False";
db.BatchSize = 100;
}).AddAssembly("MyProject.DAL.Mappings");
This code does not create tables in the database:
SchemaExport schemaExport = new SchemaExport(configuration);
schemaExport.Create(false, true);
This code creates an empty file:
SchemaExport schemaExport = new SchemaExport(configuration);
schemaExport.SetOutputFile(@"db.sql").Execute(false, false, false);
It seems that NHibernate can not "pick up" mapping files. Why?
Thanks in advance!