BuiltWithNOF

Q-Expose™ - The LINQ® Educational Tool

Would you like to see what is going on at every step of your LINQ query?

Q-Expose (“Query Expose”) from Richard Fencel Software, is a LINQ utility that displays in tabular form the results of each step of a LINQ query.   It is an educational tool for those wanting to learn LINQ.

For example, supposed you had the following LINQ query that selects from a list of manufacturers those that are located in the USA:

             var expr1 = from m in manufacturers                  
                  
where m.Country == "USA"                  
                  
select new {m.Name};

After referencing the Q-Expose WinForms DLL in your project, you merely surround the query with two debug statements:

             QExp.BpStart("My Breakpoint");

       var expr2 = from m in manufacturers
                  
where m.Country == "USA"
                  
select new {m.Name};

      
QExp.BpShow();  

When QExp.BpShow() executes, the following dialog box appears:

The dialog box shows a list of methods called by this query, namely, Where()and Select().  Because “Where” has been selected in the “Methods” listbox, you see signature of the Where() method, its arguments (there is only one, i.e.   source) and return value.  Both source and the return value are an IEnumerable whose elements are of type Manufacturer.

 Now highlight “Select”  and the internals of the Select()method are displayed:

The input to Select()is the same as the output from Where()and the output is an anonymous type with one field (Name).

Thus the dialog box provides a complete history of the query,  i.e. you can examine the inputs and outputs at every step.

Q-Expose also supports nested fields, such as occurs in object-to-relational mapping.  For example, suppose the Manufacturer class had an IEnumerable field that was a list of cars made by the manufacturer. In this case,  the display would look like:

Clicking on the first “List” field in the source would expand this column as shown below:

If any fields in the subgrid Car were also of type IEnumerable then the table would expand recursively.

Here is an example of a more complex query that generates a list of orders for each customer.  The generated list of orders includes the customer name, customer city, and the ID of the item purchased. 

In the dialog box below, the “join” step is selected, the following three lines of code:

    var query = from c in customers
              
    join o in orders
              
    on c.CustomerName equals o.CustomerName  

In the screen below, the second method is selected.  This corresponds to the following line of code:

   orderby c.CustomerName

In the screen below, the third method is selected. This corresponds to the following line of code:

     select new { c.CustomerName, c.City, o.IdProduct };  

Features:

  - Supports LINQ to Objects and with minor limitations LINQ to XML. Does NOT support LINQ to  
   ADO.NET (except for simple queries).

  - LINQ queries and their inputs and outputs are captured at every step of their execution. All fields
     that implemented as
IEnumerable can be recursed to an unlimited number of levels.

   - It is possible to move both forward and backward in the history of a LINQ query by clicking on the
     appropriate method.

   - Multiple breakpoints can be defined.

   - Breakpoints can be saved to disk for later viewing. This is especially useful when analyzing LINQ
   operations that have occurred on a remote computer

   - Includes “hello world” tutorial on LINQ to Objects, LINQ to ADO.NET (LINQ to DataSets, LINQ to
     SQL, LINQ to Entities) and LINQ to XML.

   - Requires Visual Studio 2008, Sql Server 2005, Windows XP or Windows Vista

Patent Pending.

Product Limitations:

Q-Expose works by replacing LINQ namespaces with its own.  In these replacement namespaces, the original method calls are passed straight thru to the Microsoft CLR at which time Q-Expose records the methods’ inputs and outputs.  Because LINQ was never designed to support this kind of operation, this introduces some limitations in Q-Expose.    These fall into five categories:

  • You must make minor modifications to your LINQ source code.
     
  • Certain Visual Studio LINQ features no longer work, or are degraded (e.g. F1 help).
     
  • All queries are executed immediately rather than deferred as they normally would be.
     
  • The keywords in complex syntax queries (e.g. where, select, joincan be difficult to correlate to the list of LINQ methods displayed by Q-Expose.
     
  • LINQ to ADO.NET is not supported except for simple queries.

Due to these limitations (which are discussed in detail in the demo user’s manual) , Q-Expose is marketed primarily as an educational tool with some debug capability.

Demo: The demo supports a few of the LINQ operators and a basic tutorial.

 Click Here to Download Demo

After installation, read the user’s manual found on the start menu:

Price: $30 per license

Quantity Pricing:
 
5          licenses -   $25 ea.
   16        licenses -   $23 ea.
   50        licenses -   $20 ea.
   100+    licenses -    $18 ea.

How to buy:

You may purchase Q-Expose at the following link:

 Buy Q-Expose

(it is recommended that you de-install demo before installing the full version)

Other Contact Info:
   Please send all inquiries, both technical or sales, to:

 RichardFen@cox.net

[Home] [LINQ to URI]

LINQ is a registered trademark of Microsoft Corporation.