January 18, 2013 at 12:52 am
Hy guys.
i am a windows programmer and i want to ask a question .
i develop my project with ADO and store procedure ,but i heard the linq is a better way to develop your project.
so i decided to search about it ,but in fact i couldn't find any advantage that makes me to work with that .!!!
so my question is why do you think linq is better?
---------------------------------------------------
baaaaaaaaaaaaaleh!!! (Ehs_Akb)
January 18, 2013 at 6:53 am
why no one could answer this question?
---------------------------------------------------
baaaaaaaaaaaaaleh!!! (Ehs_Akb)
January 18, 2013 at 7:11 am
Larry Page(Ehsan.Akbar) (1/18/2013)
why no one could answer this question?
Most people in the US are just getting up and around for the day.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
January 18, 2013 at 7:15 am
Larry Page(Ehsan.Akbar) (1/18/2013)
Hy guys.i am a windows programmer and i want to ask a question .
i develop my project with ADO and store procedure ,but i heard the linq is a better way to develop your project.
so i decided to search about it ,but in fact i couldn't find any advantage that makes me to work with that .!!!
so my question is why do you think linq is better?
LINQ has some advantages but it is absolutely incorrect to say that LINQ is a better approach than a stored proc. As with anything computer related there are no absolutes in the best way to approach things. LINQ is typesafe, you don't sql syntax errors at runtime (they are discovered at compile time), it does not handle long iterations very well. There are good and bad things as with any technology. Personally I don't use LINQ as my database tool, I write procs. I do however leverage the power of LINQ frequently when dealing with generics.
You might try a google search for "advantages of linq over stored procedure". You will find lots of discussions on this topic. Just keep in mind that any discussion on a topic such as this is filled with opinions and typically few actual facts.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
January 18, 2013 at 7:21 am
linq is for front end developers who have to build a database driven site w/o having extensive sql development knowledge.
u can prob write linq in a fashion that it would be as optimized as a proc however the biggest difference in my opinion between using linq or procs is the whole code reuse aspect of procs. I'm not a fan of inline sql in code. It will work for a small sites however it gets out of hand real quick. Or worse, which is how it is at my current location. There is a mishmash of inline sql and stored procs and we're too large to take the time to clean it up. That's what happens.
if u create a data access layer and use stored procs it will always be the way to go. The problem is there just aren’t that many front end developers who take the time to get good at the backend coding. I'm not blaming them. I'm not the most savvy front end developer. They're using the tools they know how to.
Long and short. Stick w/ Data access layer and stored procs and u will save urself a lot of time in the future.
January 18, 2013 at 7:38 am
really it is impossible to write your programs with linq and be sure that your performance is like procedure ,because when you in linq you have to put your code in the application layer and you should send all query to the database engine (before sending your query ,your query should be translated to sql syntax)but in procedure you should send your variables and your query is in the database .
---------------------------------------------------
baaaaaaaaaaaaaleh!!! (Ehs_Akb)
January 18, 2013 at 11:39 am
again i'm not a front end guy but we used entity framework which i thought used link when u used the sql objects for querries it called them as dynamic peramiterized sql which isnt too bad. At least the execution plan is geeting cached accross a broader spectrum than simely using dynamic sql.
Again, i may have the whole linq think wrong and the functionality i'm talking about is more of an entity framework thinkg
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply