views:

535

answers:

3

I'm hoping that we will be overhauling our system to use ASP.NET MVC, however all of the examples provided tend to use LINQ to SQL. We were told by a LINQ developer than it is actually slower than calling a store procedure.

Furthermore, how would you call a stored procedure for output using MVC? I'm not entirely sure LINQ would meet our needs as our stored procedures are extremely large, and complex. Any thoughts?

A: 

I believe that LINQ to SQL has been deprecated and LINQ to Entities is the tech to use.

Steven
Actually, for those of you who've downvoted, he's half right. The ADO.NET team has discontinued the Linq to SQL project. That doesn't justify using Linq to Entities instead, but... ;)
J. Steen
Nope, not discontinued, just not in active development. They have said that there is potential for new work but it is hardly deprecated.
Ray Booysen
+7  A: 

You can in fact call stored procedures from Linq to SQL. Take a look at this: http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx I'd argue there is no performance drop in using Linq as it is simply a way to express your sql code in C#/VB.NET. It will get translated into plain sql. This is the old fight of Stored Procedures VS normal queries, Linq is not really a part of the question.

Gustavo
This is exactly what I was thinking. LINQ is literally that a "link" as such from .NET code to SQL. How are the sprocs parameters exposed though?
Kezzer
If you creat a stored proc that receives parameters it will be exposed in .NET as a method with those same parameters, but with the .NET types.
Gustavo
+2  A: 

Yes it is slower in certain edge cases, in those cases you can call the sprocs from L2S.

kazimanzurrashid