核心问题 castle网站上给出是错误的,参见:
关于castle和Could not find the dialect in the configuration错误
http://space.flash8.net/space/?592455/viewspace-706339.html
正确配置:
<configSections>
</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>