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>
hibernate.cfg.xml

相关文章:

  • 2021-10-01
  • 2022-12-23
  • 2021-11-05
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-07
  • 2022-01-11
  • 2021-06-08
  • 2022-12-23
  • 2021-04-13
  • 2021-07-18
  • 2021-06-14
相关资源
相似解决方案