Skip to content

seangwright/xperience-community-query-debugger

Repository files navigation

Xperience Community Query Debugger

Description

This project is a .NET console application and sample Dancing Goat Xperience by Kentico project demoing how you can use the Xperience by Kentico MiniProfiler integration to quickly explore and debug database queries in an Xperience project.

Screenshots

Running the default query in VS Code

Requirements

Library Version Matrix

Xperience Version Library Version
>= 29.6.2 1.0.0

Dependencies

Package Installation

This project does not produce a NuGet package and is meant to be cloned locally or copied into a .NET solution.

Quick Start

  1. Clone this repository

  2. Change directory to examples/DancingGoat

  3. At the command line, execute the following commands

    1. dotnet tool restore

    2. dotnet kentico-xperience-dbmanager

      Example:

      dotnet kentico-xperience-dbmanager -s localhost -d DancingGoat-query-debugger -u sa -p Pass@12345 -a Pass@12345 --license-file ../xk-license.txt --recreate-existing-database

    3. Note: if you change the DancingGoat project's database name from DancingGoat-query-debugger, ensure you update the src/XperienceCommunity.QueryDebugger/appsettings.json ConnectionString value to match

  4. Run the XperienceCommunity.QueryDebugger console application

    1. Change directory to src/XperienceCommunity.QueryDebugger
    2. At the command line run dotnet run

    Included is a VS Code task dotnet: run Query Debugger to run this project

  5. View the terminal output of the query debugging

  6. Modify the queries to explore how Xperience's query APIs generate different SQL queries

If you want to use the console logging extensions in your own application you can do the following steps.

  1. Reference Xperience by Kentico MiniProfiler in your Xperience application
  2. Copy XperienceCommunity.QueryDebugger/MiniProfilerConsoleExtensions.cs into your project
  3. Perform the same kinds of query debugging calls on a MiniProfiler instance seen in XperienceCommunity.QueryDebugger/Program.cs

Contributing

Instructions for contributions to this project can be found in the Contributing-Setup.md. All contributions and engagements on this project must follow the CODE_OF_CONDUCT.

License

Distributed under the MIT License. See LICENSE.md for more information.

Support

This repository is provided as-is.

About

A console application pre-configured to debug Xperience by Kentico database queries using the Xperience MiniProfiler integration

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors

Languages