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.
- What is the pros and cons with LINQ and Entity framework in this case?
- Are the rumors true that LINQ will be discontinued?
- Which one would be most efficient to change to considering our setup?
- Any good starting points?
- What to avoid?
Here’s a brief overview..
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).
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.
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?
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.
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..