0

I have read and used many good Linq to . I have also read that some of the Linq to __ are not worth learning as there are better techniques. I was just wondering which of the bunch should I concentrate on and which have more suitable alternatives.

Thanks

2 Answers 2

4

Linq to SQL is said to be out of date. You should use the Entity Framework instead as this will continue to be developed and supported by Microsoft.

Theres not much difference between the two though.

Edit

re. references it was in a podcast interview with some of the EF guys. Might have been this one (Im not totally sure I listen to a lot...)

The basic summary as I understand it :

Linq to Sql was developed by the C# team. The main reason it was developed was to demonstrate the power of Linq. Now the team have more important things to worry about than improving database access (like the whole of c# land) so they aren't really focussing on developing it further.

Entity Framework was developed by the ADO.net team. They are all about database access and are spending all their time working on taking EF forwards.

So it's not so much that Microsoft are dropping support for Linq to SQl, but that they aren't doing anything more with it, whereas EF is and will for the foreseeable future still be actively developed. So the general advice is if you are using Linq to SQL continue using it, but if you are starting something new - you should choose Entity Framework.

6
  • excellent just the answer I was looking for. Linq to everything else, is still good though? Commented May 20, 2011 at 15:17
  • 2
    References? Any one can say Linq-to-SQL is out of date or dead or whatever. This was discussed at length on Stackoverflow and I can't see a single compelling reference that indicates it's truly dead. Commented May 20, 2011 at 15:31
  • Basically looking for the Linq to ____ that is rumored to be dead. I am guessing it's only Linq to SQL? Commented May 20, 2011 at 15:34
  • 1
    In my experience, there are still a whole lot of developers using Linq-to-SQL, and without definitive benefits, that won't change anytime soon. Personally, I like Entities, but I can see how someone would not want to switch, considering how similar they are and Entity's lack of certain tooling features. Commented May 20, 2011 at 15:34
  • I haven't used Linq-to-SQL or Entity (reason for the post) I am used to doing lots of store procedures for every type of query Commented May 20, 2011 at 15:39
4

I would just suggest to not get too stuck in the Entities vs SQL debate. They are both pretty similar, and Microsoft is not going to break every app that uses either one of them in any .Net version anytime soon. If one gets deprecated, it will be a fairly easy jump to learn the other (I use both on a regular basis, and decide which to use based on how productive the other developers on the project feel with each, even though I probably lean towards entities).

Of the lesser known/used Linqs I really like Linq-to-XML. Its really nice to use natural query syntax on XML, and you can use it to generate XML with ease as well. It makes writing an XML feed a total breeze, provided you are familiar with the structure of the data.

3
  • 1
    +1 for the Linq-To-XML. I've used it before and will use it again. Commented May 20, 2011 at 15:44
  • 1
    Thanks! I guess either one is better than building store procedures for every type of query... Commented May 20, 2011 at 15:45
  • 1
    @Spooks- Stored Procs have their own place and the debate will rage on, but for localized one-offs, Linq is the clear winner. Commented May 20, 2011 at 15:51

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.