Click here to Skip to main content
15,893,508 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello all!

I am trying to wrap my head around the concept of Linq... am I correct when I say it's basically a way to access data using code kind of resembling T-SQL.

Is there any need for T-SQL if using Linq? Are stored procedures necessary or can/should you just build them with Linq?

Please forgive my ignorance... the articles and videos i've been reading are not very concise about it.

Thank you in advance for your time,

Suraci
Posted
Comments
Abhinav S 5-Sep-10 1:55am    
Stored procedures are still very necessary...

1 solution

Sorry Suraci,

The concept is totally opposite. LINQ is intended to query application objects. There is nothing to deal with Database objects. To retrieve database object you still require T-SQL and Sql Stored Procedures.

Now if your application wants to filter the data result in application end when the user filters, you dont need to get the filtered data again from the database, rather you can use the existing data and easily filter the objects in the same way as you do in database. The capability of Grouping, Joining etc gives you an edge to filter critera in application end which would require lots of code if you do manually using normal loops.

Please take a look of my article on LINQ. I think examples might clear most of your doubts

http://www.codeproject.com/KB/dotnet/LINQ.asp[^]
 
Share this answer
 
Comments
Suraci7 4-Sep-10 20:02pm    
Fantastic explanation! Many thanks!

(Your link appears broken, however!)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900