可以在 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>

相关文章:

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