views:

790

answers:

1

We are working on a C# windows project with enterprise library 1.0 that needs to be updated to either LINQ or Entity framework. (.NET 3.5)

The application uses mainly SQL connections as stored procedures and XML files to store settings.

  1. What is the pros and cons with LINQ and Entity framework in this case?
  2. Are the rumors true that LINQ will be discontinued?
  3. Which one would be most efficient to change to considering our setup?
  4. Any good starting points?
  5. What to avoid?
+3  A: 

Here's a brief overview..

  1. This has been asked somewhat frequently - Here's a previous Q & A and I answered bascially this same question before here - however to be more specific to your scenario.. I'd need to know a bit more beyond what you've already described (i.e. besides upgrading/migrating from an Enterprise Library architecture).

  2. I think you meant "Are the rumors true that LINQ to SQL will be discontinued?".. That's also been previously discussed here but the short answer is not in the immediate future.

  3. You need to discuss a little more about your broader plans. IMHO either will work fine in the architecture you've described (feel free to provide more detail). Ask some more questions such as.. will you ever need to support a database other than SQL Server? Would you ever use eSQL (Entity SQL) or just stick with LINQ based queries?

  4. I'd suggest creating a proof of concept with your ORM of choice first and migrate a "vertical slice" of functionality, e.g. UI -> WS -> DAL and see what kind of issues you run into. What I'd suggest is that you consider how either L2S or EF will be used within your architecture.. Especially with regard to the entities themselves - i.e. change tracking.

  5. Don't rule out other options, such as NHibernate or using Codesmith templates to generate data access classes, unless you've already decided on L2S or EF..

RobS
We have found that upgrading to entitity or to Linq will be far to much work to start with since changing the base layer we will have to change everything, therefore a new enterprise library then unit tests to see what needs to be fixed ( this project is also completely new to us, with old code)
Mikelangelo
Best of luck, it will be a big project but it could be very interesting!
RobS
Thank you, can you please explain 4. i got a little lost after ORM :)
Mikelangelo