.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

LINQ VS Stored Procedure

Posted By: Narayanan     Posted Date: July 26, 2012    Points:5   Category :C#
i am learning LINQ. So Please tell me ,Difference between LINQ and Stored Procedure ?

Author: Syed Shakeer Hussain             
Posted Date: July 28, 2012     Points: 20   

Linq : Suppose you have a data in a DataSet. If you want to do Some operations on a DatSet Without hitting the DataBase then you to use LINQ.

StoredProcedure : StoredProcedures are used to execute Sql Statemetns.

There are couple of advantage of LINQ over stored procedures.
1. Debugging - It is really very hard to debug the Stored procedure but as LINQ is part of .NET, you can use visual studio's debugger to debug the queries.
2. Deployment - With stored procedures, we need to provide an additional script for stored procedures but with LINQ everything gets complied into single DLL hence deployment becomes easy.
3. Type Safety - LINQ is type safe, so queries errors are type checked at compile time. It is really good to encounter an error when compiling rather than runtime exception!

For more information check the below link

Author: Narayanan             
Posted Date: July 29, 2012     Points: 20   

Hi Syed,
Thank for your reply.It is very useful to me and learners.

Regards, Lakshmi Naraayanan.S

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend