Alex Rivera | Logout

NHibernate vs LINQ to SQL

Asked 2008-08-25T21:39:35.837
117

As someone who hasn't used either technology on real-world projects I wonder if anyone knows how these two complement each other and how much their functionalities overlap?

Edit
Report

2 Answers

26

Two points that have been missed so far:

Also the new fluent interface to Nhibernate seems to make it less painful to configure Nhibernate’s mapping. (Removing one of the pain points of Nhibernate)


Update

Linq to Nhiberate is better in Nhiberate v3 that is now in alpha. Looks like Nhiberate v3 may ship towards the end of this year.

The Entity Frame Work as of .net 4 is also starting to look like a real option.

answered 2009-01-21T15:56:43.167
0

As you written "for a person who have not used either of the them" LINQ to SQL is easy to use so any one can use it easily It also support procedures, which helps most of the time. Suppose you want to get data from more than one table then write a procedure and drag that procedure to designer and it will create everything for you, Suppose your procedure name is "CUSTOMER_ORDER_LINEITEM" which fetch record from all these three table then just write

MyDataContext db = new MyDataContext();
List<CUSTOMER_ORDER_LINEITEMResult> records = db.CUSTOMER_ORDER_LINEITEM(pram1, param2 ...).ToList<CUSTOMER_ORDER_LINEITEMResult>();

you can use you records object in foreach loop as well, which is not supported by NHibernate

answered 2011-12-20T19:01:52.893

Your Answer