Possible Duplicate:
What ORM does Stack Overflow use with their ASP.Net MVC project?

The ADO Entity framework, as we all know, is replacing LINQ to SQL as the default ORM Microsoft recommends.

I just wonder whether SO is maintaining the its data access layer in LINQ to SQL, or is planning for a migration to ADO Entity for better support?

Edit: SO was using LINQ to SQL as the DAL. Just not sure whether it is still now, or in the future.

marked as duplicate by Jeff Atwood Sep 28 '11 at 9:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Do you have any reason to believe there is a different level of support for LINQ to SQL as opposed to EF? – John Saunders Jul 20 '09 at 2:50

We use both Linq to SQL and SQL blob strings, depending on what we're trying to accomplish and which fits the code better.

For example, there is no way AFAIK to do a full text search using LINQ syntax. (Maybe there's some nasty hack, but I didn't find much last time I searched)

  • Ah but it all works so so well :op – Chris M Jul 20 '09 at 11:25
  • I'm not sure exactly what you mean by "using LINQ syntax" since they're just extension methods that have some syntactic sugar, but there is a question on SO that discusses this, and I've used it successfully as well. stackoverflow.com/questions/224475/… – GalacticCowboy Jul 20 '09 at 12:01
  • 2
    ugh, stored proc hack.. – Jeff Atwood Jul 20 '09 at 12:29
  • I'd be very tempted to switch to stored procedures if I had a site like stackoverflow.com. But then again "if it ain't broke don't fix it". Also, if you are considering making some tests to see how much performance gain you could get switching to stored procedures on SO, I would be interested to see the results. – çağdaş Jul 20 '09 at 13:15

Edit: Definitive answer, courtesy of Kyle, is that yes, Virginia, they do use LINQ to SQL.

I'm taking a stab at this since Jeff will be able to definitively answer this, but I don't know if he'll see this question. Anyway, it seems like straight SQL to me.

  1. They're taking advantage of SQL Server's Full Text Search, which uses certain SQL syntax.
  2. They need to control the speed of queries on an ever-increasing database, and the only way to really get the right indexes and performant queries is to use SQL.
  3. Jeff knows SQL very well, and it would surprise me if he tried to put the data access layer in the hands of an ORM, which is a solution to a non-existent problem, if you ask me (and you sort of did).

IMO, ORMs tend to be slow and do a horrific job of optimizing queries. Of course, I'm biased because I spend most of my days in SQL, but I still think ORMs cause more harm than good. It causes app devs to think that they don't have to understand databases, which is just naive, I think. That being said, I love using LINQ with lists and XML. Just not with SQL.

  • 1
    He did answer this several months back, and they do use LINQ to SQL: blog.stackoverflow.com/2008/09/… – Kyle Cronin Jul 20 '09 at 3:41
  • Then this list stands as 3 reasons why I'm a moron. Works either way, I suppose. Thanks for the link! – Eric Jul 20 '09 at 4:31
  • You do mean 3 more ways you are a moron, right? – Brad Gilbert Jul 20 '09 at 4:44
  • @Brad: Absolutely. The list is truly innumerable. If I were to ask my wife, I'm sure I could get an exhaustive list, though. May take a while. – Eric Jul 20 '09 at 5:02
  • Although I agree with you, but you don't seem to answer my question: I was asking whether SO is still using LINQ to SQL, given that it has already drop out of MS priority. – Graviton Jul 20 '09 at 6:12
  • @Eric: I think that you were partially right though - I think Jeff mentioned on the podcast that there were some queries that LINQ couldn't generate, and that he was using SQL by hand for them, including the full text search. – Kyle Cronin Jul 20 '09 at 6:24

Not the answer you're looking for? Browse other questions tagged .