List of Figures

Chapter 1. Introducing LINQ

Figure 1.1. LINQ building blocks, LINQ providers, and data sources that can be queried using LINQ

Figure 1.2. LINQ as language extensions and as a gateway to several data sources

Figure 1.3. How simple objects can be mapped to a database model. The mapping is not trivial due to the differences between the object-oriented and the relational paradigms.

Figure 1.4. .NET applications and data sources are different worlds. The concepts used in object-oriented programming are different from the concepts used with relational databases and XML.

Chapter 2. C# and VB.NET language enhancements

Figure 2.1. Structure of a lambda expression in C#

Figure 2.2. Structure of a lambda expression in VB.NET

Figure 2.3. IntelliSense displays extension methods with a specific icon in addition to instance methods.

Figure 2.4. Sample anonymous type produced by the compiler, as displayed by .NET Reflector

Chapter 3. LINQ building blocks

Figure 3.1. The language extensions all in one picture

Figure 3.2. A LINQ query represented as a factory where query operators are machines and sequences are the material.

Figure 3.3. C# query expression syntax

Figure 3.4. VB.NET query expression syntax

Figure 3.5. Graphical view of an expression tree

Chapter 4. Getting familiar with LINQ to Objects

Figure 4.1. Object model for the running example

Figure 4.2. Database schema for the running example

Figure 4.3. Creating a new ASP.NET web site

Figure 4.4. Default content for a web site

Figure 4.5. ASP.NET step 1 result

Figure 4.6. Result of using richer collections in ASP.NET

Figure 4.7. The Book class

Figure 4.8. Visual Studio 2008’s new project dialog box

Figure 4.9. Default content for a new Windows Forms application

Figure 4.10. New form with a DataGridView

Figure 4.11. Result of the first Windows Forms step

Figure 4.12. Result of the second Windows Forms step

Figure 4.13. DataGridView’s smart tags

Figure 4.14. Adding two columns to the DataGridView control

Figure 4.15. Mapping columns to properties and specifying column width

Figure 4.16. Sorting result

Figure 4.17. Books grouped by publisher using nested queries

Figure 4.18. Books grouped by publisher using grouping

Figure 4.19. Group join result

Figure 4.20. Inner join result

Figure 4.21. Left outer join result

Figure 4.22. Cross join result

Figure 4.23. Grid with paging

Figure 4.24. Partitioning results

Chapter 5. Beyond basic in-memory queries

Figure 5.1. A user interface that allows the user to choose the sort order he wants to see applied to a list of books

Figure 5.2. Books sorted by title in ascending order according to the user’s choice of a sort order

Figure 5.3. Books sorted by title in descending order according to the user’s choice of a sort order

Figure 5.4. A typical search screen with a criteria area used to filter books by page count and title, and to specify the results’ sort order

Chapter 6. Getting started with LINQ to SQL

Figure 6.1. Comparing the Book table with the Book class

Figure 6.2. Services offered by the DataContext

Figure 6.3. Accessing the LINQ to SQL query visualizer while debugging

Figure 6.4. LINQ to SQL query visualizer in action

Figure 6.5. Mapping the join to the extension method parameters

Chapter 7. Peeking under the covers of LINQ to SQL

Figure 7.1. Mapping the LINQinAction database using the LINQ to SQL designer tool

Figure 7.2. Object model for the IQueryable interface

Figure 7.3. ExpressionTree Visualizer representation of the book query

Figure 7.4. DataContext services to maintain the object life cycle between the application and database

Chapter 8. Advanced LINQ to SQL features

Figure 8.1. Displaying the original, current, and database value to resolve concurrency exceptions

Figure 8.2. Adding the GetBook stored procedure to the LINQ to SQL Designer

Figure 8.3. Interfaces return as a result of ExecuteMethodCall

Figure 8.4. LINQ to SQL Designer to map stored procedures to the data context as methods

Figure 8.5. Update procedure designer window to assign the custom stored procedures with CRUD operations

Figure 8.6. DataGridView for editing Publishers implementing IDataErrorInfo in the partial class

Figure 8.7. User table sample data to support inheritance based on the distinguishing UserType column

Figure 8.8. LINQ to SQL Designer with inherited users

Figure 8.9. Adding a shared address table for both the Author and Publisher tables

Figure 8.10. Layers of the Entity Framework

Figure 8.11. LINQ to SQL sequence diagram

Chapter 9. Introducing LINQ to XML

Figure 9.1. LINQ to XML’s functional construction allows the code for creating XML to closely resemble the resulting XML.

Figure 9.2. The LINQ to XML class hierarchy consists of a small number of classes, but together they provide developers with a powerful programming API for working with XML.

Chapter 10. Query and transform XML with LINQ to XML

Figure 10.1. XML returned by the Amazon.com TagLookup web service for the “dotnet” tag

Figure 10.2. The XHTML result from our LINQ to XML query

Chapter 11. Common LINQ to XML scenarios

Figure 11.1. Class diagram

Figure 11.2. The resulting Reviews RSS feed

Figure 11.3. Database schema

Figure 11.4. A class diagram showing the classes and relationships created by SqlMetal for the LinqBooks database

Figure 11.5. Amazon.com reviews XML

Figure 11.6. Amazon search UI

Figure 11.7. Author and Book class diagram

Chapter 13. LINQ in every layer

Figure 13.1. Web page that displays the list of books in a grid as well as some statistics

Figure 13.2. Web page that displays the details about a book and allows us to add authors and reviews

Figure 13.3. Web page that displays the list of publishers and their books in a grid

Figure 13.4. Database schema for the running example

Figure 13.5. The traditional three-tier application architecture, with its presentation, business logic, and data access layers, as well as the optional object models that may be used with it

Figure 13.6. An application architecture where the data object model, the data access code and the business logic are all represented by a LINQ to SQL DataContext

Figure 13.7. A three-tier application architecture, with its presentation, business logic, and LINQ to SQL data access layers

Figure 13.8. Publishers.aspx page used to display the list of the publishers contained in the LinqBooks database

Figure 13.9. Books.aspx page used to display the list of the books contained in the LinqBooks database

Figure 13.10. Book.aspx page used to display details about a book

Figure 13.11. Windows Forms user interface for importing books from Amazon

Figure 13.12. The XML import/export page displaying data from an uploaded XML document

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.129.253