Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 23rd, 2009, 09:48 AM
Registered User
 
Join Date: Feb 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default SProcs and Not Linq Queries

Hi just Got the book very intresting

just one question tho why did you choose to do it with stored procedures and not Linq Querys? thanks David
 
Old February 24th, 2009, 02:03 PM
Wrox Author
 
Join Date: Jan 2009
Posts: 73
Thanks: 0
Thanked 7 Times in 7 Posts
Default

Hi David,

You can use LINQ queries or stored procedures to access your data. It really depends on what you are more comfortable using. However, stored procedures are compiled and generally run faster than LINQ queries, although depending on what your doing you may not notice the difference.

If you've gotten to Chapter 10 you'll notice that the Query Builder control is creating a dynamic where clause and executing in-line SQL against the database. The book shows examples of LINQ queries, stored procedures, and in-line SQL. All three are viable options, I choose stored procedures for speed of execution for the majority of the queries.

Hope this helps,
Vince
 
Old May 17th, 2009, 02:04 PM
Registered User
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Stored Procedures vs. etc

Based on what I've read online (I haven't been able to use ORM at work for various reasons), both parameterized SQL and stored procedures get their execution plans compiled and cached by SQL Server. Then the issue is server memory and how long these plans stay cached before they are bumped.

(I'm sure you're well aware of the 5+ years debate about stored procedures vs. an ORM's generated SQL.)

I'm not familiar with the DataContext's ExecuteQuery internal mechanics. Would inline SQL become subject to SQL injection attacks based on user input?

Thank you for writing this book, there are very few like it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need your Help for LINQ urgently embarus BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 0 January 16th, 2009 12:13 AM
LINQ question thangxii BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 6 July 6th, 2008 03:13 PM
SQLDataSource and SPROCS mattgb1 ASP.NET 2.0 Basics 0 June 5th, 2007 08:40 PM
Combining Queries or results from 2 queries Ford SQL Server 2000 24 November 7th, 2005 08:54 PM
Crucial - need help with ras + asp + mssql sprocs cr_ras_zke Crystal Reports 0 October 18th, 2003 08:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.