Make sure that you have them set as embedded resource.

On Oct 23, 11:54 am, Алексей Ковпаев <[email protected]> wrote:
> 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!

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to