Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Linq Remove The Need For Hibernate?

Tags:

c#

linq

Just wondering whether anyone will still use Hibernate once they move to C# 3

Are these mutually exclusive??

like image 417
Jack Kada Avatar asked Dec 14 '22 01:12

Jack Kada


1 Answers

It's important to note that Linq is not just an ORM tool. There is also Linq-To-XML and Linq-To-Objects to name two but there are more. Linq is a set of language extensions to C# and VB that give you syntactic sugar when dealing with object collections.

As to your main question, Linq-to-SQL is fine if you have a one-to-one mapping from tables to domain objects. Where NHibernate comes into it's own is where you have an existing complex domain model or existing complex database schema and you want to map between them.

Additionally, it's possible to use both with Linq-To-NHibernate.

like image 93
Richard Nienaber Avatar answered Dec 15 '22 15:12

Richard Nienaber