LINQ To SQL Debugger Visualizer Revisited - Same Concerns Better UI :)

LINQ To SQL Debugger Visualizer Revisited - Same Concerns Better UI :)

by David Hayden ( Microsoft MVP C# ), Filed: LINQ To SQL

 

Update: Mentioned this on CodeBetter, too :) Check the comments. Scott Guthrie sent an email to the developer about looking into it.

In the previous post I mentioned some concerns I have with the LINQ To SQL Debugger Visualizer in that the query it displays is not the whole story:

LINQ To SQL Debugger Visualizer in Visual Studio 2008 Has Limited Value - LINQ To SQL Tutorials

Turns out I wasn't even using the Debugger Visualizer - DOH! Here is the real LINQ To SQL Debugger Visualizer, which is a separate download:

 

LINQ To SQL Debugger Visualizer

 

So, the debugger visualizer is much easier to work with than I previously mentioned in the earlier post, but it still suggests only 1 query will be executed when in actuality it will execute 40+ (correction: 90+ queries if you are using a non-modified Northwind which I downloaded again because I keep screwing with it ) queries to the database using the following code in beta 2:

 

using (NorthwindDataContext context =
                            new NorthwindDataContext())
{           
    DataLoadOptions options = new DataLoadOptions();
    
    options.LoadWith<Customer>(c => c.Orders);
    options.LoadWith<Order>(o => o.Order_Details);


context.LoadOptions = options; var query
= from c in
context.Customers select c; }

 

I talked more about that in the previous post mentioned above.

A little deceptive if you ask me, but still useful in other ways.

 

News Feed: David Hayden ( Microsoft MVP C# )

Filed: LINQ To SQL

posted on Monday, August 20, 2007 11:02 AM

My Links

Post Categories

Article Categories

Archives

Loose-Leaf Tea