Home > DeveloperSection > Interviews > What is difference between LINQ and Stored Procedures?

Posted on    August-12-2011 1:45 AM

 C# C# 
 1 Answer(s)
  2555  View(s)
Rate this:

Awadhendra Tiwari

Total Post:510

Posted on    August-12-2011 12:00 AM

Difference between LINQ and Stored Procedures:

  1. Stored procedures normally are faster as they have a predictable execution plan. Therefore, if a stored procedure is being executed for the second time, the database gets the cached execution plan to execute the stored procedure.
  2. LINQ supports type safety against stored procedures.
  3. LINQ supports abstraction which allows framework to add additional improvements like multi threading. It’s much simpler and easier to add this support through LINQ instead of stored procedures.
  4. LINQ allows for debugging using .NET debugger, which is not possible in case of stored procedures.
  5. LINQ supports multiple databases against stored procedures which need to be re-written for different databases.
  6. Deploying LINQ based solution is much simpler than a set of stored procedures

Don't want to miss updates? Please click the below button!

Follow MindStick