Chapter 14. LINQ and the ADO.NET Entity Framework

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • What LINQ is and what its syntax looks like

  • The different forms of LINQ that are available and when they are appropriate to use

  • How to use the ADO.NET Entity Framework

  • How to use the new EntityDataSource control to access the ADO.NET Entity Framework

  • How to use the ListView and DataPager controls

In the previous version of this book, targeting .NET 3.5, I mentioned LINQ as my favorite new feature in the .NET Framework. And, though not completely new anymore, that still holds true for version 4 of the framework. LINQ is the query language that is tightly integrated with the programming languages used in the .NET Framework. It stands for language-integrated query and enables you to query data from within .NET programming languages similar to how SQL enables you to query data in a database. In fact, the LINQ syntax has been modeled partially after the SQL language, making it easier for programmers familiar with SQL to get started with LINQ.

LINQ comes in a few different implementations, enabling you to access and query a wide variety of sources including collections in your own code, XML files, .NET DataSets, and databases from your VB.NET or C# code. In the next section you get a brief overview of the main LINQ pillars. The remainder of this chapter focuses on the LINQ syntax and on the ADO.NET Entity Framework (EF), a technology that enables you to work with databases without writing a lot of code. The ...

Get Beginning ASP.NET 4: in C# and VB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.