Language INtegrated Query; or LINQ, is a Microsoft .NET Framework component that adds native data querying capabilities to the .NET languages using syntax similar to SQL. LINQ is a part of the .NET Framework 3.5 and was released with the Visual Studio 2008 release on November 19, 2007.
Pro LINQ: Language Integrated Query in C# 2008 is written for the proficient C# developer who wants to learn this new technology. The author’s aim is to give you the information that matters, in a form that is usable. Instead of focusing on a complex demonstration application that cannot be put to practical use, he focuses on each of the examples as necessary. For example, when he is explaining concurrency conflicts, he has an example that creates a conflict so that you can step through it to see the conflict in action. Pro LINQ: Language Integrated Query in C# 2008 is 600 pages divided into 18 chapters segmented into 5 parts. I will cover this review based on the 5 parts.
Part 1, “Pro LINQ: Language Integrated Query in C# 2008″ begins by asking the question; “Did you just feel your world shift?” With the release of the .NET Framework 3.5, you should have. LINQ is going to change the way that developers query data. Soon, vendors will be adding “LINQ compatible” stickers to their products. Virtually any kind of data store would make a good candidate for supporting LINQ queries.
In this part you will be introduced to exactly what LINQ is, what it is not, and how it can be used. You will find some initial tips, and get an early taste of what the code looks like. Then you will get into C# 3.0’s language enhancements for LINQ. These include new object and collection initialization expressions, the ability to stub in static, sample or test data is much easier, as well as reducing the number of lines of code to create the data. Plus there is a lot more here to learn as well. One thing to note is that LINQ to Entities is not covered in this book because it is outside the core LINQ framework.
Part 2, “LINQ to Objects” looks at how you can use LINQ to work with objects; that is to work with any IEnumerable or IEnumerable<(Of <(T>)>) collection directly. If you have an array of integers and it needs to be sorted, you can now perform a LINQ query to order the results in the same way you would with a SQL query.
You will begin with learning what sequences are, the data type that represents them, and the impact of deferred query execution. It can work for or against you, so its understanding is of key importance. After you learn about the deferred operators, you will then learn about nondeferred operators. By the time you are done, you will have nearly 50 operators to choose from.
Part 3, “LINQ to XML” now moves on to XML. Here you will begin by seeing the standard methods for dealing with XML by using the W3C DOM XML API. Creating XML documents this way is a nightmare that is not only hard to read, it is even harder to support. In LINQ to XML, Microsoft not only supports queries, but it fixed a number of deficiencies in the XML API.
First the author begins by showing how to create XML hierarchies in a fraction of the code; 10 lines as opposed to 29 lines. He also shows you how to create, modify and traverse XML documents as well as performing queries on an XML object.
page 1 | 2
Post a Comment