This answer says that Linq is targeted at a slightly different group of developers than NHibernate, Castle, etc.
Being rather new to C#, nevermind all the DB stuff surrounding it:
-Adam
When you say Castle I assume you mean Castle Active Record?
The difference is NHibernate is an OR/M and is aimed at developers who want to focus on the domain rather than the database. With linq to sql, your database is pre-existing and you're relationships and some of programming will be driven by how your database is defined.
Now between NHibernate and Castle ActiveRecord -- they are similar in that you're driving your application design from the domain but with NHibernate you provide mapping xml files (or mapping classes with fluent NHibernate) where in Active Record you are using the convention over configuration (using attributes to define any columns and settings that don't fit naturally). Castle Active record is still using NHibernate in the background.
One OR/M is not necessarily the 'one true way' to go. It depends on your environment, the application your developing and your team.
You may also want to check out SubSonic. It's great for active record but it is not for project where you want to focus mainly on your Domain. Depending on the project, I usually use either NHibernate (with Castle Active Record) or Subsonic
LINQ is just a set of new C# features: extension methods, lambda expressions, object initializers, anonymous types, etc.
"LINQ to SQL" on the other hand is something you can compare other SQL wrappers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With