I'm just switching from C to C# and want to invest sometime learning database work. I'm overcome using the options: Linq-to-sql, ADO.Internet. nHibernate, EntityFramework, common sql (I'm accustomed to this). Since I Have only have limited 'learning' hrs available (a couple of.5 hrs daily), where must i invest time?

I'd rather not learn something that'll be obsolete the following month or which nobody will hire me.

Basically learn EF, will this understanding easily be transferrable to nHibernate?

Update: I made the decision to begin with nHibernate. While EF 4. has fixed many weak points, I do not have VS2010 at this time and wont get it for an additional 12 months. So nHibernate may be the guy for the time being.

Instead of pick something you believe you may be hired for, concentrate on EF (possibly) like a concrete illustration of a strategy to the ORM problem in general. Regardless of leaning EF your future employer may be an nHibernate house, or get their home-grown solution. Learn EF, but use that have to understand the the inner workings of ORM.

Personally, I believe NHibernate (plus FluentNHibernate and Linq to NHibernate) allows me keep your most sanity. In real life projects, controlling just one EDMX apply for a sizable data model in Entity Framework is actually painful across a sizable team in NHibernate, Fluent allows you separate things across multiple C# files, or even the HBM xml format enables you need to do use multiple XML files. The final time I made use of the Entity Framework, that wasn't easy unless of course you'd separate DataContexts for every model. (If that is transformed in some manner lately, I am sorry for my lack of knowledge). Probably the most difficult factor about NHibernate will most likely bite you in many ORM tools in some way: mapping object graphs to relational models is tricky. However, you get a great deal of treatments for such things as lazy loading, parent/child associations, and so forth mapping by convention is another huge win if you are using Fluent.

However, you will not go bankrupt picking the tool that Microsoft is trading in many companies did not even you should consider utilizing an ORM before the Entity Framework was launched. Personally, I do not actually want to work with firms that defer choices such as this until their vendor finds a passable solution, but the truth is, many organisations do (or will) make use of the Entity Framework.

There's practically nothing wrong with while using Entity Framework, although I suspect when you used EF in anger for any real-world work for 4 days, and NHibernate in anger for around 4 days, with multiple designers around the project, there's a high probability you'd find NHibernate simpler. In my opinion, EF looks easier in the beginning, but will get hairier the more you utilize it. NHibernate feels and looks harder in the beginning, but will get simpler and much more apparent the more you utilize it.

EntityFramework is exactly what Microsoft is showing his or her suggested database technology. It incorpates lots of what Linq-to-Sql does. I'd start there together with ADO.Internet. You'll encounter ADO.Internet a great deal too.

Such as the comment states too Linq-to-sql is not being advanced any longer either.


If you want to understand more about Entity Framework, this series of Pluralsight videos by Julie Lerman demonstrates most of the fundamentals you may require going. As Kevin pointed out, Microsoft is putting less focus on LINQ-to-SQL and much more on LINQ-to-EF.

NHibernate has greater versatility in inheritance mapping, better integration with saved procs / database functions / custom SQL / triggers, support for formula qualities also it only a elderly platform than EF 4.