Sql – Is it a bad idea to jump into LINQ to SQL now

entity-frameworklinq-to-entitieslinq-to-sqlnetorm

I have been using ADO.NET in favor of LINQ to SQL (or Entities) up to this point. I'm starting a new project that should be smallish, at least at first but I would like to have room to expand down the line.

I feel now is a good time to get into LINQ. I've avoided it for quite a while; however, I'm concerned by the current direction of LINQ to SQL. I hear LINQ to Entities is going to be MS's preferred data access in the future. I'd rather not get into LINQ to Entities because: 1.) Most likely a steeper learning curve that I don't want to throw into the mix right now (already busy learning MVC) and 2.) I hear it's not ready for primetime.

My concern is this – if I start a project with LINQ to SQL now, can I easily upgrade it to LINQ to Entities down the line?

Best Answer

LINQ to Entities is ready for primetime, and not necessarily much steeper to learn. However, LINQ to SQL is fine too, you'll learn a lot that will stay useful as you move forward.

In short, choose whatever suits the project best. If SQL Server is and will remain the DB platform, and if there's no need for remapping tables or other sophisticated tricks, LINQ to SQL will get you there very fast. It's also very efficient.