Sitecore Commerce LINQPad
The Sitecore LINQPad Driver from Adam Conn makes it really easy to use LINQPad to query against Sitecore. The goal of Sitecore Commerce LINQPad is to add some extensions to this driver to make sure Sitecore Commerce data works as expected.
CRUD on Commerce Server Items
|Without extension||With extension|
On a regular Sitecore Commerce Server installation all of the Commerce Server sub system contexts are created by HTTP modules. When you run queries from LINQPad the HTTP modules are never run so all of the Commerce Server contexts remain null and nothing works. The CommerceServerConfigReader class fixes this by updating the Sitecore configuration with a custom implementation of ICommerceServerContextManager which creates the Commerce Server sub system contexts statically so that everything will work when calls are made out side of the web.
If you choose the NuGet package route then you can install it via Sitecore Rocks, see the links below if you are unsure how to do this. If you choose the Sitecore package route then you can just use the regular Sitecore Install Wizard on the site you want to target with LINQPad.
- Setup a connection with the Sitecore LINQPad Driver
- Right click on the connection and then click Properties
- Click on the Advanced tab, then click on the Browse link to the right of the App.config reader label
- Browse and select the Sitecore.Commerce.LINQPad.dll from your site, select the CommerceServerConfigReader class, then click OK
- Make sure the App.config text box is populated with the class, then click OK
[Create and Deploy Sitecore Modules with NuGet] (http://www.velir.com/blog/index.php/2012/12/04/create-and-deploy-sitecore-modules-with-nuget/)