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:

Image Better compile-time checking of queries

Image Object-oriented mapping of entities being queried

Security advantages (for example, protections against SQL ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.