Book description
If you’ve asked yourself “Why can’t I develop database and XML queries in a language I already know?”, then Language INtegrated Query, or LINQ, is for you. LINQ For Dummies introduces you to LINQ and the .NET Framework technologies, so you can use LINQ to query any object, any data set, any kind of XML, and SQL Server—no questions asked.
This plain-English guide gives you a thorough overview of LINQ, from understanding the tasks it performs to making LINQ work with both Visual Basic and Visual Studio 2005. It explains the four LINQ providers in the .NET Framework, the easiest ways to go about accessing data, and how to write more efficient applications with less code using LINQ. There’s also clear guidance on combining third-party providers with LINQ to create even more powerful apps. With this single, comprehensive guide, you’ll discover how to:
Use one query language with all Microsoft languages
Examine .NET language extensions and work with extension methods, partial methods, lambda expressions, and query expressions
LINQ to DataSet operators, SQL server operations, XML API, or Active Directory
Deal with databases — download and install the Northwind database, generate Northwind entity classes, and create the Northwind XML mapping file
Create the partial class example, the partial method example, and the database modification example
Use objects with LINQ
Query databases in Visual Basic and C#
As an added bonus, you can visit the companion Web site for LINQ examples in C# and Visual Basic. With LINQ For Dummies, you’ll link up with LINQ in no time and see how you can query almost anything!
Table of contents
- Copyright
- About the Author
- Author's Acknowledgments
- Introduction
-
I. An Overview of LINQ
- 1. Getting to Know LINQ
- 2. Creating Simple LINQ Queries
-
3. Considering the .NET Language Extensions
- 3.1. An Overview of the Language Extensions
- 3.2. Working with Lambda Expressions
- 3.3. Understanding the Role of the IEnumerable and IEnumerable <T> Interfaces
- 3.4. Understanding Object Initializers
- 3.5. Understanding Collection Initializers
- 3.6. Working with Extension Methods
- 3.7. Working with Partial Methods
- 3.8. An Overview of Expression Trees
- 3.9. Working with Query Expressions
- 4. Working with LINQ in Visual Basic .NET
- 5. Working with LINQ in Visual Studio 2005
-
II. Using Standard LINQ to Technologies
-
6. LINQ to Object
- 6.1. Considering the Use of Objects with LINQ
- 6.2. Creating the Simple Object Query Example
- 6.3. Understanding the Role of Deferred Operators
-
6.4. Creating the Deferred Operator Examples
- 6.4.1. Working with Concat
- 6.4.2. Working with AsEnumerable, AsQueryable, Cast, and OfType
- 6.4.3. Working with OfType and Where
- 6.4.4. Working with DefaultIfEmpty, Empty, Range, and Repeat
- 6.4.5. Working with GroupBy and ToLookup
- 6.4.6. Working with GroupJoin and Join
- 6.4.7. Working with Skip, SkipWhile, Take, and TakeWhile
- 6.4.8. Working with Select and SelectMany
- 6.4.9. Working with Distinct, Except, Intersect, and Union
- 6.4.10. Working with OrderBy, OrderByDescending, Reverse, ThenBy, and ThenByDescending
- 6.5. Understanding the Role of Nondeferred Operators
-
6.6. Creating the Nondeferred Operator Examples
- 6.6.1. Working with Aggregate, Average, Count, LongCount, Max, Min, and Sum
- 6.6.2. Working with ToArray, ToDictionary, ToList, and ToLookup
- 6.6.3. Working with ElementAt, ElementAtOr Default, First, FirstOrDefault, Last, LastOrDefault, Single, and SingleOrDefault
- 6.6.4. Working with SequenceEqual
- 6.6.5. Working with All, Any, and Contains
- 7. LINQ to DataSet
- 8. LINQ to SQL Server
-
9. LINQ to XML
- 9.1. Considering the Use of XML with LINQ
- 9.2. Working with the LINQ to XML API
-
9.3. Understanding the LINQ to XML Operators
- 9.3.1. Working with XDeclaration, XElement, and XDocument
- 9.3.2. Working with XNamespace
- 9.3.3. Working with XProcessingInstruction
- 9.3.4. Working with XAttribute
- 9.3.5. Working with XComment and XText
- 9.3.6. Working with XCData
- 9.3.7. Working with XDocumentType
- 9.3.8. Working with XNodeDocumentOrderComparer
- 9.3.9. Working with XNodeEqualityComparer
- 9.3.10. Working with Remove
- 9.3.11. Working with XName
- 9.4. Creating the Simple XML File Example
-
6. LINQ to Object
-
III. Extending LINQ to New Horizons
- 10. Using LINQ with Office 2007
- 11. Advanced LINQ to SQL Server
- 12. LINQ to Active Directory
-
13. Other LINQ to Strategies
- 13.1. Understanding the Qualifications for a LINQ to Solution
- 13.2. Accessing COM+ Using LINQ
- 13.3. Creating the Resource Description Format (RDF) Files Example
- 13.4. Creating the MySQL Example
-
IV. The Part of Tens
-
14. Ten Ways to Improve LINQ Development
- 14.1. Using LINQ Tools to Simplify Coding
- 14.2. Using LINQ to Create Self Documenting Code
- 14.3. Analyzing Code Patterns
- 14.4. Querying a Code Snippet Database
- 14.5. Locating Other Development Resources
- 14.6. Using LINQ to Query Data Formats
- 14.7. Finding Usage Trends
- 14.8. Developing a LINQ Library
- 14.9. Sharing LINQ Queries with Others
- 14.10. Analyzing Compiler and IDE Output
-
15. Ten Ways to Reduce Application Support Costs
- 15.1. Creating Self-Modifying Queries
- 15.2. Using LINQ to Create Reports
- 15.3. Addressing User Search Needs
- 15.4. Creating User-Friendly Mashups
- 15.5. Making Help More Accessible
- 15.6. Organizing and Querying Support Requests and Responses
- 15.7. Developing Fast Searches from Multiple Sources
- 15.8. Helping Users Locate Existing Resources
- 15.9. Performing Support Task Automation
- 15.10. Improving Application and System Management
-
16. Ten LINQ Resources
- 16.1. Starting with the Microsoft Developer Network
- 16.2. Getting Tips from the Microsoft Blogs
- 16.3. Finding Help in Third-Party Web Sites
- 16.4. Finding Help in Third-Party Newsletters and Blogs
- 16.5. Using Other Sources for LINQ to Objects Projects
- 16.6. Using Other Sources for LINQ to SQL Server Projects
- 16.7. Using Other Sources for LINQ to XML Projects
- 16.8. Considering Other LINQ to Sources Projects
- 16.9. Getting Help with Visual Basic Projects
- 16.10. Getting Help with C# Projects
-
14. Ten Ways to Improve LINQ Development
Product information
- Title: LINQ For Dummies®
- Author(s):
- Release date: August 2008
- Publisher(s): For Dummies
- ISBN: 9780470277942
You might also like
book
LINQ Unleashed for C#
Foreword by Darryl Hogan, Architect Evangelist, Microsoft Corporation Microsoft’s highly anticipated LINQ query technology makes it …
book
LINQ to Objects Using C# 4.0
“For several years, Troy has been one of the key figures in the LINQ community. This …
book
Pro LINQ: Language Integrated Query in C# 2008
LINQ is the project name for a set of extensions to the .NET Framework that provide …
book
Professional ADO.NET 3.5 with LINQ and the Entity Framework
Language Integrated Query (LINQ), as well as the C# 3.0 and VB 9.0 language extensions to …