The ASP.NET MVC Query Builder is an HTML5/JS based control that allows you and your end-users to create and edit SQL queries without manual coding. It provides a rich and convenient interface to visually display all query elements, which simplifies the query construction process for users who are unfamiliar with SQL and its provider-specific dialects.
The Query Builder generates SELECT statements incorporating query clauses for data filtering, grouping, and sorting. You can use these statements to supply data to various data-aware MVC controls (such as the Grid View or Chart Control).
The Query Builder is a data-aware control and requires a valid data connection to obtain database schema information for populating a table list. This connection also enables the Query Builder to generate the resulting query in a proper SQL dialect and automatically resolve table relations based on foreign keys.
You can add specific tables or views to a query using the drag-and-drop operation without manually writing the query string. Enabling the table columns' check boxes includes them in the query result set.
The Query Builder allows you to join multiple tables or views in the same query and specify various join options. This control automatically resolves table relationships if they are defined at the database level. You can also manually construct relationships by connecting the table key fields.
The Query Builder enables you to narrow the query result set by applying filter criteria to initial and grouped data. The built-in Filter Editor provides a visual interface to simplify the filtering process and construct criteria of any complexity.