Nhibernate Session 01的夏天,为什么会出现NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException? [英] Summer of Nhibernate Session 01, why am I getting NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException?

查看:85
本文介绍了Nhibernate Session 01的夏天,为什么会出现NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对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中,您必须设置

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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆