问题描述
我对NHibernate完全陌生,紧接着在www.summerofnhibernate.com上的截屏视频中,这真棒.在演示的最后,单元测试应该通过了,但是对我来说,它说:
I'm completely new to NHibernate, following along on the screencast at www.summerofnhibernate.com, which is awesome. Towards the end of the presentation, the unit test is supposed to pass, but for me it says:
NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException: The ProxyFactoryFactory was not configured.
我在做什么错了?
推荐答案
我敢打赌,您使用NH 2.1,而截屏视频使用的是2.0.
I bet you use NH 2.1 while the screencast used 2.0.
在2.1中,您必须设置 proxyfactory.factory_class 到NHibernate.ByteCode.Castle.ProxyFactoryFactory,NHibernate.ByteCode.LinFu.ProxyFactoryFactory或NHibernate.ByteCode.Spring.ProxyFactoryFactor之一
In 2.1 you have to set proxyfactory.factory_class to one of NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.LinFu.ProxyFactoryFactory or NHibernate.ByteCode.Spring.ProxyFactoryFactor
这篇关于Nhibernate Session 01的夏天,为什么会出现NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!