BootstrapCardViewBuilderBase<T>.BindToLINQ(IQueryable) Method
Binds the Card View to a queryable data source in server mode.
Namespace: DevExpress.AspNetCore.Bootstrap
Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
query | IQueryable | An IQueryable object that specifies the query request to the data service. |
Returns
Type | Description |
---|---|
T | A reference to this instance after the operation is completed. |
Remarks
IMPORTANT
Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.
The Card View control supports data binding in server mode, which is designed to work with large datasets. This technique significantly improves the Card View’s speed and responsiveness.
The BindToLINQ method is used to establish server-mode data binding using the Entity Framework (EF) Core ORM. The following code demonstrates the described functionality in detail.
@model IQueryable<Email>
@(Html.DevExpress()
.BootstrapCardView<Email>("cardViewWithLargeDatabase")
.KeyFieldName(k => k.ID)
.Columns(columns => {
columns.Add(c => c.From);
columns.Add(c => c.Subject);
})
.Routes(routes => routes
.MapRoute(r => r
.Action("BindingToEFCorePartial")
.Controller("CardView")))
.BindToLINQ(Model))
See also the Binding to Large Database using EF Core online demo.