03.11.2016 Views

Beginning ASP.NET 4.5 in CSharp and VB Opsylum

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14<br />

LINQ <strong>and</strong> the ADO.<strong>NET</strong> Entity<br />

Framework<br />

WHAT YOU WILL LEARN IN THIS CHAPTER:<br />

‰ What LINQ is <strong>and</strong> what its syntax looks like<br />

‰ The different forms of LINQ that are available <strong>and</strong> when they are<br />

appropriate to use<br />

‰ How to use the ADO.<strong>NET</strong> Entity Framework<br />

‰ How to use the EntityDataSource control to access the ADO.<strong>NET</strong><br />

Entity Framework<br />

‰ How to use the ListView <strong>and</strong> DataPager controls<br />

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER<br />

You can f<strong>in</strong>d the wrox.com code downloads for this chapter on the Download Code tab at<br />

www.wrox.com/remtitle.cgi?isbn=1118311809. The code is <strong>in</strong> the Chapter 14 download.<br />

Language-Integrated Query (LINQ) is the query language that is tightly <strong>in</strong>tegrated with the<br />

programm<strong>in</strong>g languages used <strong>in</strong> the .<strong>NET</strong> Framework. LINQ enables you to query data from<br />

with<strong>in</strong> .<strong>NET</strong> programm<strong>in</strong>g languages <strong>in</strong> the same way that SQL enables you to query data <strong>in</strong><br />

a database. In fact, the LINQ syntax has been modeled partially after the SQL language, mak<strong>in</strong>g<br />

it easier for programmers familiar with SQL to get started with LINQ.<br />

LINQ comes <strong>in</strong> a few different implementations, enabl<strong>in</strong>g you to access <strong>and</strong> query a wide<br />

variety of sources, <strong>in</strong>clud<strong>in</strong>g <strong>in</strong>-memory data, XML files, .<strong>NET</strong> DataSets, <strong>and</strong> databases from<br />

your <strong>VB</strong>.<strong>NET</strong> or C# code. In the next section you get a brief overview of the ma<strong>in</strong> LINQ pillars.<br />

The rema<strong>in</strong>der of this chapter focuses on the LINQ syntax <strong>and</strong> on the ADO.<strong>NET</strong> Entity<br />

Framework (EF), a technology that enables you to work with databases without writ<strong>in</strong>g a lot

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!