包括 SqlServer 2005 和 MySql 数据库的配置:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<!--<property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>-->
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<!--<property name="dialect">NHibernate.Dialect.MySQLDialect</property>-->
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<!--<property name="connection.connection_string">
Database=MyTest;Data Source=localhost;User Id=root;Password=12345678;allow zero datetime=true;
</property>-->
<property name="connection.connection_string">
<!--Database=AdtDB;Data Source=192.168.1.104;Port=3305;User Id=root;Password=12345678;allow zero datetime=true;-->
Database=SLDB;Data Source=192.168.1.61;User Id=sa;Password=12345678;
</property>
<property name='proxyfactory.factory_class'>NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
<property name="show_sql">True</property>
<mapping assembly="AVIC.Model"/>
</session-factory>
</hibernate-configuration>