Nhibernate1.21

Nhibernate1.2配制(hibernate.cfg.xml):

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration  xmlns="urn:nhibernate-configuration-2.2">
  <session-factory name="ESession">
    <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
    <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
    <property name="connection.connection_string">server=.;database=pubs;uid=sa;pwd=sa;</property>
    <property name="show_sql">false</property>
    <property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
    <property name="use_outer_join">true</property>
    <property name="command_timeout">500</property>
    <property name="query.substitutions">true 1, false 0, yes 1, no 0</property>
    <mapping assembly="Model"/>
  </session-factory>
</hibernate-configuration>

把这个放到网站根目录下。

原文地址:https://www.cnblogs.com/single/p/1025941.html