views:

70

answers:

3

So I'm about to start a new website from scratch and I've spent about a week trying to figure out what technology to go with. I'm sold on ASP NET MVC. I'm 100% sure I'm going to love using that. but what i am not so sure about yet is using Ling-to-SQL. So far I've gathered some data...

  1. StackOverflow uses it - can't be that bad
  2. can be REALLY slow if you don't take advantage of compiled queries
  3. will always be slower than ADO net, but can be almost just as fast if using #2 in the proper places
  4. is NOT the preferred MS solution (there was a thread here on SO about dropping support)

I'm itching to use it, but just want to make sure it's the best for me. I come from a heavy ADO/stored procedure and traditional asp net background (this will be my first experience with ASP MVC).

+2  A: 

If it gets the job done, use it. If used properly, performance can be perfect even for high load environments.

You should also evauluate the alternatives though. You'll probably want to check out Entity Framework (the other Microsoft framework) and nHibernate. Both are good alternatives and both support LINQ syntax.

Justin Niessner
Yes, by all means - if it works for you, just use it and be happy - don't worry! :)
marc_s
+1  A: 

You need to provide your requirements for performance when trying to decide based on this characteristic. There are plenty of reasons to use this technology beyond performance. I would recommend that you build a simple application with Linq-to-SQL to understand whether you like the programming model. Even if Linq-to-SQL was guaranteed to double your performance, would you still like to use it on a regular basis if you don't like to program with it?

Do you have any constraints that prevent you from learning LINQ as you build this new site? eg. a deadline.

BrianLy
A: 

I am in a similar situation where I'm sold on MVC for a consulting project but I'm not to sold on using Linq to SQL. Though my experience with Linq has been strictly in the Linq to XML world, I will say Linq is pretty easy to dive into using.

For my day job we are debating using Entity Framework vs Nhibernate for a new project. Keep in mind if you are for some reason still using .Net 2.0 or lower Nhibernate is your way to go as the Entity Framework from what I understand is .Net 3.5+. NHibernate also supports SQL Server 2000/2005. This may not make a difference to you but it did for us as our company is very slow to upgrade.

Gizmo78