Republished With Permission - Original Article
Last month I wrote
about the new LINQ language features for VB and C#. My blog post
introduced some of the core concepts of LINQ, and demonstrated how you can use
LINQ to perform rich queries over standard .NET business classes and object
collections. I also showed how you could easily bind the results of these
queries against ASP.NET controls. You can read all about how to-do this here.
One of the really powerful aspects of LINQ is that it can be
used against any type of object or data source, and provides a consistent
programming model for doing this. LINQ ships with implementations that support
LINQ against regular object collections, databases, entities, and XML sources.
Because LINQ supports rich extensibility, developers can also easily integrate
LINQ with other data sources and providers as well.
In this blog post I’m going to provide a quick overview of
some of the key LINQ for databases concepts (aka DLINQ), and then walk
through a sample that shows how you can start to use LINQ against a database
within an ASP.NET 2.0 application. You can download the LINQ May CTP from here and use the steps
below with VS 2005 or the free Visual Web Developers Express edition to follow
along (note: the LINQ May CTP runs in VS 2005 and does not touch any existing
binaries). You can also download the completed samples I build below