Note that Castle ActiveRecord configuration.

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Development on Castle may refer to teacher Li Huijun Castle develop a series of articles, there are about ActiveRecord study practice the two part series and Castle IOC container series, is a good tutorial.

Here mainly to explain the need to pay attention to in the Castle ActiveRecord configuration problem.

Build configuration file structure

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord" />
  </configSections>
  <activerecord>
    <config>
      <add key="connection.driver_class" value="NHibernate.Driver.SQLite20Driver" />
      <add key="dialect" value="NHibernate.Dialect.SQLiteDialect" />
      <add key="connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
      <add key="connection.connection_string" value="HjQZ6akwsC9bZXSIrh2NVFwCWFDrwbcVWd0f4s6Udjm5AWXIPpsYan+E4hrY8MxB0Ti1w2A8cI+uFhst9R7XiwOYbqC2IXhMtWb4Xcc4UCD23DNL0L/8Su6SqmpWCKXY0d87rF4AJRk5tfmhIKuBMJOwPecy0ixa1NrqSC3dREE=" />
      <add key="proxyfactory.factory_class" value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle"></add>
    </config>
  </activerecord>
  
</configuration>

Need to pay attention to the 1 is here, when configuring config block. Key must not add "hibernate.", for example: "hibernate.connection.driver_class", this kind of writing errors will occur in the new version.

The 2 best proposal to add "<add key=" proxyfactory.factory_class "value=" NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle "> </add>", or there might be some strange questions.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Jo at November 17, 2013 - 6:46 PM