Learning Guide

LINQ Learning Guide: LINQ and Web applications

 

   TABLE OF CONTENTS   

 

   LINQ Quick Start
   LINQ and Visual Studio 2008's new language features
   LINQ Providers
   LINQ and Web applications
   LINQ to Objects
   LINQ to XML
   LINQ to SQL
   LINQ to DataSet
   LINQ to Entities
   Third-party LINQ Implementations
    VISIT OUR OTHER LEARNING GUIDES

 

LINQ and Web applications

This section of the LINQ Learning Guide focuses on how the Language Integrated Query can be used in Web applications in both Visual Studio 2005 and VS 2008. It also offers some words on Blinq, which is a flavor of LINQ to SQL that works with ASP.NET sites but does not seem to have garnered much attention lately. The subsequent section of the LINQ Learning Guide spends more time looking at LINQ to SQL resources.

Video: Using LINQ with ASP.NET in Visual Studio 2008 (Scott Guthrie)
This video walks programmers through the process of using LINQ against a SQL database for a Web application.

Using LINQ with ASP.NET (Scott Guthrie)
Here Guthrie builds an app that binds a collection of objects to a DataGrid and makes uses of Anonymous types and .NET Standard Query Operators. "What is really powerful is that the .NET Standard Query Operators are not a hard-coded list, and can be added to and replaced by any developer. This enables very powerful domain specific implementations," he writes (emphasis original).

Using DLINQ with ASP.NET (Scott Guthrie)
This article dives into database programming with DLINQ and ASP.NET. (DLINQ is the previous name for LINQ to SQL. Today, DLINQ is the name of an object-relational mapping tool from Microsoft.) Here again the Anonymous type is a star, as it allows developers to pull only the desired column values from a database, as opposed to returning fully populated entity objects. In addition, Guthrie points out, LINQ queries can return sub-collections of objects.

Building and using a LINQ for SQL Class Library with ASP.NET 2.0 (Scott Guthrie)
Having used the LINQ to SQL designer to define data models, and having been " really impressed with how easily it enables me to build a re-usable class library that nicely encapsulates my data and business logic," Guthrie decided to share his findings with the world.

LINQ to XML in ASP.NET: Ajax-enabled XML document filtering (Mustafa Basgun)
Having created an Ajax- enabled Web application with a drop-down list bound to an XML document, this blogger decided to share his brief lesson with the world.

LINQ to Objects and JavaScript (Nikhil Kothari)
The exact syntax of LINQ doesn't necessarily carry over to JavaScript, but the concepts do. Here the author of Script#, a C# compiler that generates JavaScript, explains how these concepts and constructs apply. It's worth considering if you dabble in Ajax, Kothari suggests.

*** And now for a few words about Blinq…

Blinq is an implementation of LINQ to SQL that was built atop the May 2006 CTP release of LINQ. With Blinq, programmers can draw from a SQL database to populate ASP.NET Web sites "with pages that display sorted and paged data, allow you to update or delete records, create new records, and follow relationships between tables in your database."

Microsoft describes Blinq as an "unsupported tool," and activity in the Blinq Preview section of the ASP.NET Forums seems to have slowed a bit recently, so we won't devote much attention to it here. The above pages should provide some insight into whether Blinq may make sense for your ASP.NET applications. In addition, two blog entries -- Check out Blinq by Brad Abrams and Install Blinq and run it by Dhinakaran -- should help you get started if you decide to use Blinq.

 


*** Go on to the next section of the LINQ Learning Guide: LINQ to Objects

This was first published in February 2008

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: