映射关系文档:http://www.castleproject.org/index.php/ActiveRecord:Mappings
依赖包:
You must reference the following set of assemblies to use ActiveRecord:
- Castle.ActiveRecord.dll
- Castle.Model.dll
- Nullables.dll
But ActiveRecord also depends on NHibernate, so you must reference the following as well:
- NHibernate.dll
- Castle.DynamicProxy.dll (Curious? Check DynamicProxy)
- Nullables.NHibernate.dll
- log4net.dll
- Iesi.Collections.dll
总之只要安装了 Castle.msi ,把以上包全部加进去就好了。
另外,本试验用到了 VS.NET 的测试驱动外挂 TestDriver.NET 2.0,需要安装的
下载:TestDriven.NET-2.0.1545d.zip
Blog.cs 内容:
BlogManager.cs 内容:
_TestUnitCase\BlogTest.cs 内容:
内嵌资源 test.ActiveRecord.config 内容: