Summary

With the introduction of Language Integrated Query in .NET 3.5 (and C# 3.0), data access to a wide variety of domains has never been easier. Ranging from in-memory querying over IEnumerable<T> collections, over hierarchical XML data, to all sorts of external database formats, LINQ unifies querying over all those data domains. In doing so, it brings a lot of desirable properties to the table:

• Better compile-time checking of queries

• Object-oriented mapping of entities being queried

• Security advantages (for example, protections against SQL injection attacks)

• Rich tooling support, ranging from IntelliSense to mapping tools

• Support for extensibility with custom providers

• No need to learn a plethora of query languages with obscure ...

Get C# 4.0 Unleashed 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.