官术网_书友最值得收藏!

What is new in NHibernate 4.0?

The General Availability release of NHibernate 4.0.3.400 was released on August 17 2014. This is the latest release of NHibernate as of the time of writing of this book. This release is quite important from a lot of perspectives. This is a major release of NHibernate that has come almost after three and a half years, so it contains a lot of interesting features and bug fixes.

If you are new to the ORM land or have never used NHibernate before, then you may not find this section very interesting. But hey, why not keep reading and you might find something that strikes a chord with you:

  • NH 4.0 is built for .NET 4.0. This may not mean much for the users of NHibernate 4.0 as you can still use older versions of NHibernate on a project that is built on .NET 4.0. However, this is a major move for NHibernate since it now gives NHibernate developers the ability to utilize new features of .NET 4.0. An immediate consequence of this was that NHibernate 4.0 now does not depend on the Iesi.Collection library to support sets (Iesi.Collections.Generic.ISet<T>) because .NET 4.0 has native support for sets, in the form of ISet<T>, and implementations such as HashSet<T>. Back in the days when the old versions of .NET did not have support for sets, the Iesi.Collections library offered a mature set functionality. NHibernate had a dependency on this external library as NHibernate uses sets to represent collections.
  • Support for SQL Server 2012 has improved with the implementation of the native IIF function, query paging, and SQL Server 2012 sequences.
  • "Mapping by code" rids you of having to write and maintain cumbersome XML mapping files. However, the general audience was never happy with this feature as it was buggy till recent times. NHibernate 4.0 has several defects in this area fixed, thus giving Mapping by code a facelift.
  • We all love LINQ and we all hated the fact that NH's LINQ support never matched that of Criteria or QueryOver. There has been great community contribution in this area with over 140 issues fixed. LINQ support in NHibernate 4.0 has matched that of other query providers in a lot of respects. We will be using this feature a lot in the coming chapters of this book.
主站蜘蛛池模板: 香河县| 桂林市| 永和县| 泰顺县| 四子王旗| 宁国市| 苍山县| 绿春县| 上蔡县| 夏津县| 淮南市| 安国市| 韩城市| 老河口市| 江川县| 清新县| 奎屯市| 佛冈县| 高安市| 惠来县| 南部县| 香格里拉县| 汉寿县| 宁河县| 莲花县| 陇西县| 镇安县| 毕节市| 陈巴尔虎旗| 惠来县| 新建县| 波密县| 阿坝县| 贵港市| 璧山县| 望奎县| 南开区| 嘉峪关市| 囊谦县| 鹤庆县| 灵石县|