C# Demo Projects for Active Query Builder ASP.NET Edition 2
This repository holds demo projects for the OBSOLETE version of Active Query Builder ASP.NET Edition!
Please proceed to the Demo projects repository for Active Query Builder ASP.NET Edition 3
Active Query Builder is a visual query builder and SQL parser component for ASP.NET (WebForms and MVC).
- Download the trial version from the product web site
- Get it by installing the ActiveQueryBuilder.ASPNET NuGet package.
The demo projects in this repository illustrate various aspects of the component's functionality from basic usage scenarios to advanced features. They are also included the trial and full versions of Active Query Builder. A brief description of each project can be found below.
- Visual Studio 2012 or higher,
- .NET Framework 4.0 or higher.
- Active Query Builder ASP.NET NuGet package.
- Clone this repository to your PC.
- Open the .sln file of the demo project you want to explore in Visual Studio.
- Select the "Tools" - "NuGet Package Manager" - "Package Manager Console" menu item.
- Install Active Query Builder ASP.NET NuGet package by running the following command:
Install-Package ActiveQueryBuilder.ASPNET
- Run the project.
Welcome to the Active Query Builder Help Center! There you will find:
- End-user's Guide,
- Getting Started guides,
- Knowledge Base,
- Community Forum.
All demo projects can be arranged into three groups:
- 'Getting started' projects for different environments.
- Projects which contain frequently asked code samples for different environments.
- Projects to illustrate advanced aspects of the component's functionality. Projects in the third group are designed for the WebForms environment only, but they don't contain any evnvironment-specific functionality, so their code can be used in any environment.
Projects which require a database connection must be configured according to the database server being used.
- Specify the connection string in the section of the 'Web.config' file.
- Choose the syntax and metadata providers which suit your database server and connection method. Read details in this article: What are the Syntax and Metadata Providers for?.
There are two basic projects for each of the environments:
- The Offline project which doesn't establish a connection to database, but reads metadata from the pre-generated XML file (usually from the Northwind database). It is ideal for quick acquaintance with the component.
- The Query Results project which must be configured to connect to a database. It lets quickly test the component with your database. It also illustrates usage of the CriteriaBuilder control along with a result data grid.
In addition to two basic demo projects there's a project to illustrate interaction with ASP.NET controls. A button with the UpdatePanel which triggers asyncronous postback event in this demo switches metadata loading from one preset to another.
\WebForms\Simple Query Results Demo
\WebForms\Simple Offine Demo
\WebForms\Interact With ASPNET Controls
There is only one demo for MVC 2.0 as this environment is getting old. The principles of working with Active Query Builder in this environment is similar to the later versions.
\MVC\MVC 2 Demo
MVC 4.0 demo projects are designed for both ASPX and Razor view engines.
\MVC\MVC 4\ASPX Offline Demo
\MVC\MVC 4\ASPX Query Results Demo
\MVC\MVC 4\Razor Offline Demo
\MVC\MVC 4\Razor Query Results Demo
MVC 5.0 demo projects are designed only for the Razor view engine, but you are free to use any engine according to your needs.
\MVC\MVC 5\Simple Offline Demo
\MVC MVC 5\Simple Query Results Demo
This demo shows how to switch database connection in runtime.
\WebForms\Change Connection Demo
\MVC 5\Change Connection Demo
The Alternate Names feature allows for substitution of unintelligible names of database objects and fields for friendly aliases. End-users see the friendly names in the visual query building interface as well as in the query text when editing it manually. The component gets the query with real names back only when you need to execute the query against a database server. Read more about this feature in the Knowledge Base: Defining friendly names for database objects and fields.
\WebForms\Alternate Names Demo
\MVC 5\Alternate Names Demo
Advanced SQL writers may wish to turn displaying of friendly aliases off to see the real names in the visual query building interface. This demo project gives the sample for this operation.
\WebForms\Toggle UseAltNames Demo
\MVC 5\Toggle UseAltNames Demo
This demo illustrates various ways of loading metadata information to Active Query Builder. Metadata handling is described here: Metadata handling and filtration.
This demo gives an idea how to build a custom structure of nodes in the Database Schema Tree: Creation of folders for particular objects (Favorites), folders which contain objects according to a mask, etc. Read more about this feature: Customizing the Database Schema Tree structure.
This demo illustrates the ability to add queries as new objects to the Database Schema Tree that act like ordinary database views. Users see virtual objects as ordinary database objects and can use them in their queries without the need to understand their complexity. The same is true for virtual fields: you can add new fields and put complex SQL expressions or correlated sub-queries as their expressions. The users will see them as ordinary fields even in the SQL query text. They will be expanded to corresponding SQL expressions only when you need to execute the query against a database server. Read more about this feature in the Knowledge Base: Adding virtual objects and calculated fields to database schema.
This demo contains the code example of a pass through the entire internal query object model.
This demo provides code samples of programmatic creation of various SQL queries.
This demo explains how one can analyze and modify user queries to correct user errors or to limit the data returned by them.
This demo adds a button to the in-place editor of Expression and Criteria cells of the Query Columns List and gives the sample of creating a custom editor to edit the cell content in a popup window.
This demo provides sample of integration of a third-party SQL text editor to enable SQL syntax highlighting.
This demo illustrates run-time switching and appliance of jQueryUI themes.
This demo introduces the experimental feature of letting define virtual fields by end-users.
This demo implements a visual query building interface without the Design Area. Users build queries by dragging fields from the Database Schema Tree to the Query Columns List and define query column properties, such as grouping, ordering, etc. The appropriate database objects are automatically added to the query, get linked with each other and removed when they aren't needed.
This demo gives an idea how to perform custom actions in response to some user actions. The full list of available JavaScript events can be found in this article: Active Query Builder JavaScript API.
This demo presents Active Query Builder in a high-contrast theme. Role and ARIA-LABEL attributes are defined for the controls to allow narrative speaking.
The source code of the demo projects in this repository is covered by the MIT license.