In the last few months I started to learn one of the great frameworks from Microsoft named LINQ. In order to get a better understand about the LINQ framework I read a lot from the official Microsoft documentation. I even shared people in my thoughts about the LINQ project (I focused on LINQ to SQL with its pervious name D-LINQ), in my blog. After a while I took a time to read the "Pro LINQ" book. This book exposes me to some fundamentals in the LINQ world which I wasn't familiar with, and helped me to improve my knowledge in the LINQ world.
The LINQ framework is based on some new features from the new C# 3.0. Therefore this book brings a short briefing about these features, each one of them accompanied by good demonstration. Every chapter in this book is (almost) standing alone.
My favorite section in this book was the LINQ to SQL. It's the most powerful and interesting part in the LINQ Framework. The book starts this section with a small chapter that helps the readers to understand the basic terminology about all the LINQ to SQL components. The book contains all the detail about verity options to work with the LINQ to SQL in the real work. Furthermore, the book compares some of these methods and gives us the ability to choose the appropriate solutions based of your needs (like: Projecting into Entity Classes vs. Nonentity Classes, Using the SqlMetal command line or the Object Relational Designer, XML Mapping File Vs. DBML Intermediate File and etc).
The book contains a lot of tips that really can help during the daily work. I'll mention the top 5 tips that can help you to implement LINQ to SQL in your application:
- How to support the legacy code.
- How to use the Data Context Logger.
- Take Advantage of Deferred Queries
- Consider Using Partial Classes or Mapping Files
- Consider Using Partial Methods.
While the book shows the ability of the auto generated sophisticated code, it gives good guidelines of how to write all this code in your own hands and a set of rules about the issues that you should be aware when you implement it by yourself.
I really re commend this book for all people that want to learn about LINQ from introduction to professional level.