1、链接配置
1 <?xml version="1.0" encoding="utf-8" ?> 2 <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> 3 <session-factory name="Test"> 4 <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> 5 <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> 6 <property name="connection.connection_string">Server=.;initial catalog=TestNHibernate;User Id=sa;Password=Hello1234</property> 7 <property name="adonet.batch_size">10</property> 8 <property name="show_sql">true</property> 9 <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> 10 <property name="use_outer_join">true</property> 11 <property name="command_timeout">60</property> 12 <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property> 13 <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property> 14 <mapping assembly="TestDomain" /> 15 </session-factory> 16 </hibernate-configuration>