Is Proxy Factory necessary in NHibernate?

后端 未结 1 1035
名媛妹妹
名媛妹妹 2021-01-04 23:33

I\'ve this configuration in the hibernate.cfg.xml:




        
相关标签:
1条回答
  • 2021-01-05 00:10

    If you're using the latest of NHibernate(2.1), you'll notice that mainline for NH doesn't have a dependency on castle for proxy generation anymore, so all those tutorials you've been looking at are probably out of date.

    Basically, you now have a few choices of how you want your dynamic proxies created, so you'll need to explicitly configure which proxy generator you want to use. Examples can be found in this how-to post on forge. A full list of the options is referenced here.

    P.S. if you want to keep things simple, just use Castle as the older versions of NHibernate all used it by default.

    0 讨论(0)
提交回复
热议问题