upgrade to nhibernate 3.1

2019-01-28 06:40发布

问题:

I have a project using NHibernate (version 2.2). For upgrade to NHibernate 3.2 , What should I do?

Do I need that upgrade following dlls?

  1. NHibernate.Linq.dll
  2. Iesi.Collections.dll
  3. Castle.Core.dll
  4. Castle.DynamicProxy2.dll
  5. Log4net.dll

Do I need that upgrade hbm files? Do I need that upgrade hibernate.cfg.xml file?

回答1:

  1. When upgrading to NH 3.2 you don't need NHibernate.Linq.dll anymore, but method name that is used to get LINQ support is not Linq<T> - its Query<T> now
  2. You don't need to change hbm files
  3. You will need to update Iesi.Collections assembly
  4. You don't need castle.dynamic proxy dll (you still can use it, but its not required anymore)
  5. Log4Net is not required anymore
  6. You will probably need to change your cfg file in order to change dynamic proxy settings

The easiest way to get latest version of NH with all required assemblies is to use Nuget



回答2:

upgrade the dlls and test your program, normally this should be enough