本文介绍了将NHibernate从1.2升级到3.2时需要注意些什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题说明了一切。使用一个使用NHibernate 1.2的旧代码库。作为升级的一部分,我有什么收获,以及我会失去什么,或经历过什么痛苦?总的努力是否值得,如果是的话,这些好处是什么?而当我在这,它是有道理的,只是移动到流利NHibernate的?

解决方案

这真的取决于什么nhibernate你正在使用的功能。采取释放节点,看看有什么东西在你使用的。大多数函数在3.2中仍然是一样的。你必须在你的映射文件中做一些升级。



当时我会做一个更改。所以,如果没有流利的工作,就去做吧,然后决定是否值得流利。你还应该看看QueryOver和linq的用法。


Question says it all. Working with an old codebase that is using NHibernate 1.2. What do I stand to gain, and what will I lose, or experience in pain, as part of this upgrade? Is the total effort worth the benefit, and if so, what are those benefits? And while I'm at it, would it make sense to just move to Fluent NHibernate?

解决方案

This really depends on what nhibernate functions you are using. Take the release nodes and see if anything is in there you are using. Most functions are still working the same in 3.2. You have to do some upgrades in your mapping files.

I would do one change at the time. So get it working without Fluent, and decide if it is worth doing going to fluent. You should also have a look a QueryOver and the usage of linq.

这篇关于将NHibernate从1.2升级到3.2时需要注意些什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 12:01