Tips
It's early in the LINQ to SQL chapters, and keeping with my style, I am going to jump the gun and give you some tips requiring information I have yet to discuss. So if this section makes little sense to you, my work is done! After all, I want you to know about these tips before you need them, not after you have learned them the hard way.
Use the DataContext.Log Property
Now would be a good time to remind you of some of the LINQ-to-SQL-specific tips I provided in Chapter 1. One of those tips titled "The DataContext Log" discussed how you could use the DataContextobject's Log property to display what the translated SQL query will be. This can be very useful for not only debugging purposes but for performance analysis. You may find that your ...
Get Pro LINQ: Language Integrated Query in C# 2008 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.