O'Reilly logo

WCF 4.0 Multi-tier Services Development with LINQ to Entities by Mike Liu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging LINQ to Entities programs

In Visual Studio 2010, when debugging a LINQ to Entities program, we can use the traditional Watch or Autos windows to inspect a variable. For example, after the following line is executed, we can go to the Autos window to see the contents of the products variable:

var products = from p in NWEntities.Products
               where p.CategoryID == 1
               select p;

The Autos window should look like this:

Debugging LINQ to Entities programs

We can also hover our mouse over the products variable, wait for the Quick Info pop-up window to appear, and then inspect it on the fly. The pop-up Quick Info window will appear as shown in the following image:

In either of the windows ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required