Feeds

Introducing Microsoft LINQ

A new approach to data query in the .NET world.

Intelligent flash storage arrays

Book review Microsoft's Language Integrated Query (also known as LINQ), is one of the key features on the .NET horizon. Already out as a beta, it's slated for release as part of Visual Studio 2008 (which goes under the code name of Orcas, which conjures images of packs of killer whales rather than shrink-wrapped development software).

However, Microsoft has done a good job of whetting developers' appetites, and there's plenty of interest in LINQ already.

As the name implies, LINQ integrates query capabilities (both relational and XML querying) into the key .NET programming languages C# and Visual Basic. This moves way beyond supplying useful and highly functional APIs for querying relational and XML data stores and gets us into the realms of structured querying as syntactic elements of C# and VB. With LINQ, you write very high-level code that embeds queries that are compiled as part of the language. And no, it's a lot more than simply embedding SQL or XQuery strings into your applications.

Obviously, there's a lot that has to go on under the covers for all of this to work – you need more than a generous sprinkling of syntactic sugar for it to piece together. This book takes a stab both at showing how LINQ works and at investigating the changes in C# and Visual Basic and the next generation of .NET that enable it to happen. But the starting point is explaining what LINQ is, so the first chapter includes a round-up of LINQ, showing what it is, how it works, and offering some examples of the different flavours of LINQ (objects, XML and ADO.NET).

More detailed chapters follow this, on the specific implementations in C# and Visual Basic. In the case of C# there's a quick run through of language features introduced in version 2.0 and then on to the major new features included in C# 3.0, including type inference, lambda expressions, extension methods and, of course, query expressions. There's a corresponding chapter devoted to Visual Basic 9.0, which includes a section on feature differences with C# 3.0.

Once these preliminaries are out of the way the emphasis is firmly on LINQ again, with a long chapter on details of the syntax, including the query operators (including filtering, joining, aggregating and so on that you're familiar with from SQL) and conversion operators (which enable you to treat the result of a query as a List, Enumeration, Dictionary etc). LINQ to ADO.NET also gets a chapter, which provides a link between LINQ and the primary existing .NET mechanism for interfacing to relational data. LINQ to XML also gets a chapter.

It's not just in getting to the data easily that LINQ provides value; it's also in bridging the gap between the relational view of the world and object view (computer scientists like to call this the impedance mismatch, which confuses electrical engineers no end). The need to be able to persist objects to relational databases is the sort of thing that is normally handled by an object-relational mapping (ORM) layer (and in the Java world it's Hibernate that is the best known ORM solution). LINQ provides a new take on this too, making it even more of an attractive proposition.

However, while there's a lot of good material in this book, and it does indeed provide a fairly wide introduction to LINQ, it's not exactly a gripping read. The book is a bit dry and manual-like, with large chunks of syntax-related reference material.

Introducing Microsoft LINQ

Microsoft LinqVerdict: If you're desperate to get a handle on LINQ (and remember, it's still only in beta), then this is sure to hold your interest.

Authors: Paolo Pialorsi and Marco Russo

Publisher: Microsoft Press

ISBN: 0735623910

Media: Book

List Price: £23.99

Current Reg price: £15.83 inc. VAT (discount 34%)

Buy this book at Register Books at Reg Developer's special discounted price (subject to change). ®

Top 5 reasons to deploy VMware with Tegile

More from The Register

next story
Preview redux: Microsoft ships new Windows 10 build with 7,000 changes
Latest bleeding-edge bits borrow Action Center from Windows Phone
Google opens Inbox – email for people too thick to handle email
Print this article out and give it to someone tech-y if you get stuck
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
UNIX greybeards threaten Debian fork over systemd plan
'Veteran Unix Admins' fear desktop emphasis is betraying open source
Entity Framework goes 'code first' as Microsoft pulls visual design tool
Visual Studio database diagramming's out the window
Google+ goes TITSUP. But WHO knew? How long? Anyone ... Hello ...
Wobbly Gmail, Contacts, Calendar on the other hand ...
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
prev story

Whitepapers

Choosing cloud Backup services
Demystify how you can address your data protection needs in your small- to medium-sized business and select the best online backup service to meet your needs.
Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.