Wrox Programmer Forums
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion 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 October 28th, 2011, 11:56 AM
Authorized User
Join Date: Feb 2011
Posts: 13
Thanks: 2
Thanked 0 Times in 0 Posts
Default LINQ or T-SQL?

The ASP .Net 4 in C# and VB book was great for me. It let me successfully complete my first web-based project, launch the next phase of my career, and should give me the tools I need for many more years.

I am starting a new project and have the great luxury of some time to work on the structure, plus a little experience to perhaps use this time wisely. I started looking at how the Microsoft Membership code works, and was thinking of writing T-SQL queries, coupled with C# Stored Procedure commands:

cmd.CommandType = CommandType.StoredProcedure;

I started reviewing the WROX book "Beginning T-SQL". The first thing I noticed is that the author mentions LINQ as a reasonable alternative for "small" projects. It's quite something to pick up a book on something new, and find the approach I've been using mentioned in Chapter 1. (Yes, I always read Chapter 1!)

This is an "intranet" application with less than 20 users. It's replacing an Access database of about 15 MB (after 5 years of collecting data) with a Visual Basic 4 front end. It's a pretty small application.

Here's my question. For this project, is there any real advantage to T-SQL, or should I just go down the road with LINQ? How about the next project after this one, which should have about 100 users and a database about 2 to 4 times this size? When do the advantages of T-SQL become significant? It's always nice to expand my took kit. But I don't want to over-burden these projects with complexity they don't need.
Old October 29th, 2011, 09:36 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

The size of the app or user base may not be a very important factor. A site like Stack Overflow, one of the most popular sites of the moment, runs on LINQ to SQL, showing that if you design well, L2S scales well.

For most scenarios, L2S or its bigger brother Entity Framework are excellent solutions. Stored procedures may come in handy when you have extensive database processing needs, or when you need tight security.

For what you're describing below, I think L2S or EF would work fine.


Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Old October 29th, 2011, 11:36 AM
Authorized User
Join Date: Feb 2011
Posts: 13
Thanks: 2
Thanked 0 Times in 0 Posts

A smart man can master the unknown technology and make the project work. A wise man asks if the unknown technology is necessary or helpful. Thanks for the advice.

Similar Threads
Thread Thread Starter Forum Replies Last Post
LINQ to EF and LINQ to SQL sophia BOOK: Beginning ASP.NET 4 : in C# and VB 1 October 19th, 2011 12:16 PM
Exception on submit changes in LINQ to SQL mangel BOOK: Professional Visual Basic 2010 and .NET 4 15 April 5th, 2011 07:19 PM
LINQ to SQL or not? gvdamn BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5 2 August 20th, 2009 05:08 AM
LINQ to SQL bakm04 BOOK: Professional C# 2008 ISBN: 978-0-470-19137-8 0 August 17th, 2009 04:07 PM
LINQ to SQL in TheBeerHouse zhoux BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 October 1st, 2008 07:37 AM

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