Wrox Home  
Search

Topic: ASP.NET

Cover image for product 047041569X
LINQ-ifying TheBeerHouse: An N-Tier LINQ Web Application with ASP.NET 2.0 Website Programming Problem Design Solution
Lee Dumond
ISBN: 978-0-470-41569-6
Wrox Blox PDF
October 2008
Electronic Version: US $6.99 Purchase This Download

About This Title  |  Download Code  |  Errata
Description
Finally, TheBeerHouse website from ASP.NET 2.0 Website Programming: Problem–Design–Solution gets the ASP.NET 3.5 treatment! This Wrox Blox presents two unique approaches to applying LINQ to SQL to data access in TheBeerHouse.   In Part 1, you’ll take advantage of the original application’s data provider model to develop a custom LINQ to SQL provider for the Articles module. In Part 2, you’ll try a different approach, while learning how to develop an ASP.NET 3.5 application using a purely LINQ-based three-tier model.

Along the way, you’ll learn about LINQ to Objects; the newest features of the C# 3.0 language and .NET Framework 3.5 like object initializers, collection initializers, automatic properties, extension methods, lambda expressions, anonymous types, query and method syntax; the IQueryable interface; and deferred execution. You’ll learn how to upgrade an existing ASP.NET 2.0 application to ASP.NET 3.5, how to create LINQ to SQL entities from an existing database, and how to extend those entities to provide custom functionality. You’ll learn the secrets of creating a faster, more responsive website with LINQ to SQL, including how to use time stamps to speed up concurrency checking, how to take advantage of the ASP.NET view state, how to replace deprecated data-bound controls with better ones, how to pass queries properly between methods, how to return the right data to your user interface, how to streamline your data access methods, and how to compose the most efficient LINQ to SQL queries possible.

Every aspect of both solutions is described in detail with clear, concise explanations; extensive code listings; and screen shots. Armed with this knowledge, you’ll be able to continue on your own, incorporating LINQ technologies in the other TheBeerHouse modules, and in your own applications.

Table of Contents

What Is LINQ? 2

New C# 3.0 Language Features 2

New .NET Framework 3.5 Features 9

Part 1: Creating a Data Access Provider Using LINQ to SQL 11

What You’ll Need 11

Preparing the Application 11

Preparing the LINQ to SQL Entity Classes 13

Writing a New LINQ to SQL Provider 17

Part 2: Creating a New LINQ-Based N-Tier Model 35

Application Structure Overview 36

Methods That Work with Categories 39

Methods That Work with Comments 42

Methods That Work with Articles 48

Which Way Is Better? 56

Where to Go from Here 57

More Things You Can Try in TheBeerHouse 57

The Future of LINQ 58

Summary 58

About Lee Dumond 60

Usage Rights for Wiley Wrox Blox

Any Wrox Blox you purchase from this site will come with certain restrictions that allow Wiley to protect the copyrights of its products. After you purchase and download this title, you: 

  • Are entitled to three downloads
  • Are entitled to make a backup copy of the file for your own use
  • Are entitled to print the Wrox Blox for your own use
  • Are entitled to make annotations and comments in the Wrox Blox file for your own use
  • May not lend, sell or give the Wrox Blox to another user
  • May not place the Wrox Blox file on a network or any file sharing service for use by anyone other than yourself or allow anyone other than yourself to access it
  • May not copy the Wrox Blox file other than as allowed above
  • May not copy, redistribute, or modify any portion of the Wrox Blox contents in any way without prior permission from Wiley

If you have any questions about these restrictions, you may contact Customer Care at (877) 762-2974 (8 a.m. - 5 p.m. EST, Monday - Friday). If you have any issues related to Technical Support, please contact us at 800-762-2974 (United States only) or 317-572-3994 (International) 8 a.m. - 8 p.m. EST, Monday - Friday).

ASP.NET Related Resources

Forums

Blogs

Articles