IQueryBuilderClientSideModelGenerator.GetModel(String) Method
Creates a client-side Web Query Builder model based on the specified data.
Namespace: DevExpress.XtraReports.Web.QueryBuilder.Services
Assembly: DevExpress.XtraReports.v25.2.Web.dll
NuGet Package: DevExpress.Web.Reporting.Common
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| connectionName | String | The name of the database connection. |
Returns
| Type | Description |
|---|---|
| QueryBuilderModel | A client-side Web Query Builder model. |
Example
The following code implements the controller action and returns the Query Builder model. For more information on ASP.NET Query Builder, refer to the following help topic: Query Builder.
public IActionResult Index(
[FromServices] IQueryBuilderClientSideModelGenerator queryBuilderClientSideModelGenerator)
{
var newDataConnectionName = "NWindConnection";
var queryBuilderModel = queryBuilderClientSideModelGenerator.GetModel(newDataConnectionName);
return View(queryBuilderModel);
}
The complete sample project is available in the DevExpress Examples repository on GitHub.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetModel(String) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.