Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 28th, 2011, 11:56 AM
Authorized User
Points: 58, Level: 1
Points: 58, Level: 1 Points: 58, Level: 1 Points: 58, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #2 (permalink)  
Old October 29th, 2011, 09:36 AM
Imar's Avatar
Wrox Author
Points: 66,617, Level: 100
Points: 66,617, Level: 100 Points: 66,617, Level: 100 Points: 66,617, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,123
Thanks: 65
Thanked 1,386 Times in 1,366 Posts
Default

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.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
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!
Reply With Quote
  #3 (permalink)  
Old October 29th, 2011, 11:36 AM
Authorized User
Points: 58, Level: 1
Points: 58, Level: 1 Points: 58, Level: 1 Points: 58, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2011
Posts: 13
Thanks: 2
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 03:01 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.