Thursday, February 1, 2007

Nhibernate or Linq?

i had been working using NHibernate since last year, however recently, i switched to Linq. The reason is because the Linq is tightly integrated with Visual Studio Orcas. I found that manipulating data is so simple and having implement linq doesn't complicate your application architecture. Additionally, linq and VS introduce signification productivity gain while minimizing investment on producing and maintaining the software. Well, NHibernate does do the job well but the query language is awkward compare to Linq which I need to double check the NHibernate query 's string that i entered is always correct. So will Linq the future choice? Yes but not at the moment, however you can start try NHibernate while waiting the full release of VS Orcas which support Linq. Right now, using NHibernate allows you to switch database provider model on the fly which linq not support (at the moment), meaning that you can switch between MySQL and Oracle by changing the xml file. So no matter what database you use, you are still dealing with the one and only one way of CRUD the database. Btw, you need to use some tool to work with Nhibernate such as MagicDraw ( and AndroMDA (

Learn more:
Linq to SQL get started snippet example

No comments: