NHibernate is an Object-relational mapping (ORM) solution for the Microsoft .NET platform. It is licensed under the GNU Lesser General Public License. It is a port of the popular Java O/R mapper Hibernate to .NET. Version 1.0 mirrors the feature set of Hibernate 2.1, adding a number of features from Hibernate 3. NHibernate 1.2.0, released May of 2007, introduces many more features from Hibernate 3 and support for .NET 2.0, stored procedures, generics and nullable types.
- All classes and collections with 1.2 are now loaded lazily by default. You may need to change lazy=”false”, or make methods be virtual.
- Use .Net 2.0 Generics for all collection interfaces (You no longer have to use the NHibernate.Generics compatability library).
- Support Batching for SQL Server - huge perforamance increase in some scenarios.
- Support Stored Procedures.
- Support named connection strings.
- Support SQL Server 2005 and SQL Server 2005 Everywhere dialects.
- Support Parametrized types and User Collection Types.
- Support projections in criteria queries, i.e. CreateCriteria(typeof(T)).Count(), and CreateCriteria(typeof(T)).Max(…), etc.
- New IL-based reflection optimizer - another big performance boost.
- Use SetProjection(Projections.Count(”ID”)) instead of IQuery’s Select count(*).
- New DetachedCriteria
- New GetCurrentSession method of SessionFactory: SessionFactory.GetCurrentSession()
You can click here to check out a list of .Net ORM products.