LINQ: The Future of Data Access in C# 3.0

Joe Hummel

image with no caption

Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo

Abstract

Microsoft’s new Language Integrated Query (LINQ) technology brings a fully-integrated query language to the next version of C# (and VB), for high-level data access against objects, relational databases, and XML documents.

In this Short Cut you’ll learn how you can use LINQ and C# 3.0 to accomplish a variety of tasks, from querying objects to accessing relational data and manipulating XML. Best of all, you’ll be able to test the examples and run your own code using the latest LINQ CTP, available free from Microsoft. This Short Cut also includes a complete reference to the standard LINQ query operators.

Learn LINQ and the C# 3.0 Features That Support It

Imagine writing SQL-like queries entirely in C#, with IntelliSense and compile-time type checking. Imagine queries as flexible as dynamically-generated SQL, yet as secure and efficient as calling stored procedures. Now take these same queries and execute them against an XML document or against a collection of data objects. While Microsoft isn’t quite there yet, this is the goal of the LINQ project.

Language Integrated Query (LINQ) is a C# 3.0 API centered on data access. Developers focused on data access will be able to leverage the LINQ API to interoperate with a variety of data sources ...

Get LINQ: The Future of Data Access in C# 3.0 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.