Monday, August 15, 2011

LINQ - Difference between LINQ and Stored Procedures.


Difference between LINQ and Stored Procedures:
  • 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.
  • LINQ supports type safety against stored procedures.
  • 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.
  • LINQ allows for debugging using .NET debugger, which is not possible in case of stored procedures.
  • LINQ supports multiple databases against stored procedures which need to be re-written for different databases.
  • Deploying LINQ based solution is much simpler than a set of stored procedures 

No comments:

Post a Comment