nhibernate配置代码
时间:2011-04-17 来源:the illusion
可以在 Medium Trust Level 下运行的配置
声明配置节
<section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" requirePermission="false"/>
配置
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<bytecode-provider type="null"/>
<reflection-optimizer use="false"/>
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">
Server=xxx;Database=xxx;Uid=xxx;Pwd=xxx;
</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name="hbm2ddl.keywords">none</property>
<property name="current_session_context_class">managed_web</property>
<property name="show_sql">true</property>
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
<property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
<mapping assembly="ArtWithLetters"/>
</session-factory>
</hibernate-configuration>
相关阅读 更多 +