Apr 16, 2008

Pro Linq Book review

Pro Linq Language Integrated Query in C#2008 Joseph C. Rattz, Jr. Microsoft must be under new management, we are getting a slew of new, truly useful tools that are making pretty big strides forward for faster more enjoyable C# development and ease of maintenance. The latest technologies seem well worth taking the time to master. I find the combination of LINQ, entities and the Sync framework couldn't have come at a better time. Oh yeah, while the book mentions that LINQ to SQL only supports SQL Server, that is no longer true as you can also use (at least) MS SQL Server Compact Edition 3.5 (which is required for the Sync Framework). You can't use the visual object relational designer with SQLce but the book documents SQLMetal, and you can use that to create your context. Overall I found this to be a very good book but it has a few flaws. If like me you are interested in LINQ for a current or upcoming database project here is what I would suggest. First don't start with this book, finish with it. Start with the ten excellent screen casts by Mike Taulty. Then read this book, your reading will go much faster and you'll get a satisfyingly sated feeling. The author will probably hate me for saying this, but if you already know SQL or ADO.NET 2.0, I would suggest reading Chapters 1-3, then skim 4 and 5 just to get an overview of the operators available. Then read part 5 on LINQ to SQL. After you digest that I would suggest whichever topics interest you the most, then I would finish with a more thorough read of Chapters 4 and 5 on Deferred and Nondeffered operators, which in my mind are really a thoroughly documented reference section. The reason the author will hate that, is he doesn't want readers to use LINQ for just database purposes, and he states that many times in the book. In fact, I think that is why he put the LINQ to SQL section at the end. However, he seems to have made a significant effort to make any part readable on its own, so I see no problem with skipping to the end so early. The book doesn't really cover data binding, but there is a lot of good information on that available on the internet (the above mentioned screencasts show some of them, and an overly long video on Channel 9 with Young Joo from August 2007 shows even more . I also have a few nit-picky things that drove me crazy. The most significant one being the amount of repetition and unedited console output. I was also none too happy that the author didn't mention that the Visual Studio Command prompt was under the START menu not an IDE menu. (I'll show you how to find it and use it in my April 12 posting ). But then again without the author I wouldn't even have known there was a Visual Studio 2008 command prompt. The book could use a much better index, and I'm still wondering what happened to the explanation of the "let" clause. That said, I also found a good half-dozen or so gems that saved me way more time than any of the nits cost me. Now I could tell you what those are but I think you should buy the book to find out.

About Me

My photo
Tod Gentille (@todgentille) is now a Curriculum Director for Pluralsight. He's been programming professionally since well before you were born and was a software consultant for most of his career. He's also a father, husband, drummer, and windsurfer. He wants to be a guitar player but he just hasn't got the chops for it.