LINQPad Context Driver
- 2 minutes to read
XPO ships with a LINQPad context driver. This topic describes how to install the driver and use it to query XPO persistent classes.
Install the Driver
To install the XPO LINQPad context driver, click Add connection in the main window. Then choose View more drivers... and Browse....
You will be presented with a dialog window where you need to point LINQPad to a custom context driver. By default, the XPO context driver is installed to the C:\Program Files (x86)\DevExpress 19.2\Components\Tools\Components folder. Navigate to this folder, choose the XPOContextDriver.lpx file and click Open.
Query XPO Persistent Classes
After you have installed the driver, it will be listed in the Choose Data Context dialog invoked via the Add connection command from the main window. Choose the driver and click Next >.
Click Browse... to select the assembly containing persistent classes you wish to query.
The DevExpress.Xpo and DevExpress.Data assemblies that were used to compile the persistent classes assembly must be present in the Global Assembly Cache (GAC). You will also need the DevExpress.Xpo.Linq assembly for XPO versions prior to v2011 vol 2. If these assemblies are not available in GAC, you can simply place them next to the persistent classes assembly.
Specify the connection parameters for the database holding the persistent classes data and click OK.
To check that you have successfully installed the XPO context driver and specified the correct database connection parameters, right-click a persistent class and run a test query.