Saturday, November 14, 2009

NHibernate 3.0 goodness

As the release of Entity Framework 4.0 is getting closer, it's time to have a look at the competition. After the release of NHibernate 2.1(.1), the NHibernate team is working on the next big release based on the .NET 3.5 framework.

A selection of some of the upcoming features in NHibernate 3.0:

  • QueryOver: Allows the usage of ICriteria in a type safe way.
   1:  IList<Student> students =  session.QueryOver<Student>()  
   2:  .Where(s => s.Name == "Fabio")
   3:  .And(s => s.StudentNumber > 100) 
   4:  .List();

  • New Linq provider: A new linq provider is coming up fully based on AST. This will replace the current NHibernate.Linq 1.0 project.
  • Strongly typed configuration for multiple parts of NHibernate(caching, sessionfactory,...)
  • Better WCF integration for session management
  • ...

I think we'll have a very interesting future in ORM land...

No comments: