Skip to main content
All docs
V23.2

QueryBuilderInput Class

Contains the SQL SELECT statement and the SELECT query.

Namespace: DevExpress.DataAccess.Web.QueryBuilder

Assembly: DevExpress.DataAccess.v23.2.dll

NuGet Packages: DevExpress.DataAccess, DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap

Declaration

public class QueryBuilderInput

The following members return QueryBuilderInput objects:

Remarks

The QueryBuilderInput instance contains the query that the Web Query Builder user creates and saves. The following code snippet illustrates the purpose of this class:

using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using DevExpress.XtraReports.Web.QueryBuilder.Services;
using DevExpress.DataAccess.Web.QueryBuilder;
using DevExpress.DataAccess.Sql;
// ...
[HttpPost]
public async Task<IActionResult> SaveQuery(
[FromServices] IQueryBuilderInputSerializer queryBuilderInputSerializer,
[FromForm] DevExpress.DataAccess.Web.QueryBuilder.DataContracts.SaveQueryRequest saveQueryRequest)
{
    try
    {
        var queryBuilderInput = queryBuilderInputSerializer.DeserializeSaveQueryRequest(saveQueryRequest);
        SelectQuery resultingQuery = queryBuilderInput.ResultQuery;
        string sql = queryBuilderInput.SelectStatement;
        // ...
    }
    catch (Exception ex)
    {
      // ...
    }
}

The complete sample project is available in the following DevExpress Examples repository on GitHub:

View Example: How to Use the Query Builder Control in an ASP.NET Core Application

Inheritance

Object
QueryBuilderInput
See Also