nhibernate Resource not found: ConsoleApplication1.Customer.hbm.xml
Configuration config = new Configuration();
config.AddClass(typeof(ConsoleApplication1.Customer));
的时候提示 Resource not found: ConsoleApplication1.Customer.hbm.xml
app.config
<?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /> </configSections> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > <session-factory> <property name="connection.provider"> NHibernate.Connection.DriverConnectionProvider </property> <property name="dialect"> NHibernate.Dialect.MySQLDialect </property> <property name="query.substitutions">hqlFunction=SQLFUNC</property> <property name="connection.driver_class"> NHibernate.Driver.MySqlDateDriver </property> <property name="connection.connection_string"> Database=mytestdatabase;Data Source=localhost;User Id=root;Password=routing </property> <property name="show_sql">false</property> <mapping assembly="ConsoleApplication1"/> </session-factory> </hibernate-configuration> </configuration>