TheBeerHouse website from ASP.NET 2.0 Website Programming: Problem–Design–Solution gets the ASP.NET 3.5 treatment with two unique approaches to applying LINQ to SQL to data access. You’ll take advantage of the original application’s data provider model to develop a custom LINQ to SQL provider for the Articles module then try a different approach, while learning how to develop an ASP.NET 3.5 application using a purely LINQ-based three-tier model.
You’ll learn about LINQ to Objects; new 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 to create 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.
Table of Contents
What Is LINQ?
New C# 3.0 Language Features
New .NET Framework 3.5 Features
Part 1: Creating a Data Access Provider Using LINQ to SQL
What You’ll Need
Preparing the Application
Preparing the LINQ to SQL Entity Classes
Writing a New LINQ to SQL Provider
Part 2: Creating a New LINQ-Based N-Tier Model
Application Structure Overview
Methods That Work with Categories
Methods That Work with Comments
Methods That Work with Articles
Which Way Is Better?
Where to Go from Here
More Things You Can Try in TheBeerHouse
The Future of LINQ