ActiveRecord3.0 asp.net 配置说明

来源:互联网 发布:梦龙网络计划是什么 编辑:程序博客网 时间:2024/05/16 18:58

核心问题  castle网站上给出是错误的,参见:
关于castle和Could not find the dialect in the configuration错误
http://space.flash8.net/space/?592455/viewspace-706339.html


正确配置:

<configSections>

<section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord" />
</configSections>
<activerecord>
<config>
  <add key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
  <add key="dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
  <add key="connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
<add key="proxyfactory.factory_class"value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" />
  <add key="connection.connection_string" value="UID=sa;Password=sa;Initial Catalog=ARDemo;Data Source=." />
</config>
</activerecord>