views:

69

answers:

4

In Java, Hibernate is king in terms of automating code/DB synchronization. And I'm aware NHibernate is a .NET equivalent, and that LINQ has some cool SQL functions (despite not being developed further IIRC).

But, is there any advantage from pairing .Net development with a SQLServer database? Magic automatic persistence of objects perhaps? Or these days does your language/DB pairing make little difference?

+2  A: 

A simple pairing of .NET with SQL will afford you nothing over a good ORM.

The only possible reason to use the two together is that both come from the same vendor and will certainly inter-operate well.

That's why Linq2Sql came about, not after NHibernate (Hibernate for .NET) has been around for years.

Oded
+2  A: 

Being the data layer is supposed to abstract the DB you choose, any intentional built in advantages would increase coupling and defeat the purpose of abstraction.

P.Brian.Mackey
Disappointing. I though making their products work well together beyond common standards was one thing MS historically did!
John
haha, well there are things like the SQL CLR which give .NET an advantage with SQL. But that operates independantly of your program and has no relation to ORM. Of course, if you are already programming with .NET, then you don't have to hire new programmers or learn a new language to extend the functionality of SQL.
P.Brian.Mackey
+1  A: 

I'd say try and use what you know, if that's SQL Server go with that. You don't get free magic automatic persistence of objects with .net+sql server you'll have to combine it with something else. Big benefit of .net + sql server is it's all MS so it will to fit together and there's a massive community to call upon if you need assistance (most other DB's also have large support communities as well).

ORM frameworks are very popular and there's loads of them available for most databases. We use LINQ2SQL because it works for us. Other developers I know use EF, Subsonic and NHibernate.

Perhaps you can play/review a few ORMs and see if any have killer features that you'll use or stand out due to the configuration, ease of use, features or something else that you like.

Andy Robinson
"it's all MS so it will to fit together". How? Or rather, how more so than .net + any other DB?
John
Stepping directly into stored procedures, built in SQL client, integrated server explorer for example.
Andy Robinson
A: 

Considering the "in terms of ORM" part of the question, the only synergy I see between a .NET application and SQL Server is through Linq to SQL. With Linq to SQL you'll essentially get a better integration of ORM tools into Visual Studio (fancy entity designer, custom templates...) and of course Linq querying. I'm not sure if that's worth the bother though, since Linq to SQL is and apparently will remain really limited compared to the big ORM solutions.

Other benefits are really specific and not especially related to ORM, such as a better fit with the CLR stored procedures available since SQL Server 2005.

ian31