QueryBuilderExtension.Bind(String) Method
In This Article
Binds the Query Builder to a data source using the specified connection name.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.2.dll
NuGet Package: DevExpress.Web.Mvc5
#Declaration
public QueryBuilderExtension Bind(
string connectionName
)
#Parameters
Name | Type | Description |
---|---|---|
connection |
String | A string that specifies the connection string name defined in the application’s configuration file. |
#Returns
Type | Description |
---|---|
Query |
A Query |
#Remarks
The following code snippet demonstrates how to bind the Query Builder to a database using the connection string name.
@Html.DevExpress().QueryBuilder(settings => {
settings.Name = "QueryBuilder";
settings.RouteValues = new { Controller = "QueryBuilder", Action = "Invoke" };
}).Bind("NorthwindConnection").GetHtml()
See Lesson 1 - Add the Query Builder to a Project for more information.
See Also