BootstrapCardViewBuilderBase<T>.BindToXPO<TEntity>(XPQuery<TEntity>) Method

Establishes a server-mode data binding via DevExpress eXpress Persistent Objects for .NET (XPO) ORM.

Namespace: DevExpress.AspNetCore.Bootstrap

Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll

Declaration

public T BindToXPO<TEntity>(
    XPQuery<TEntity> query
)
Public Function BindToXPO(Of TEntity)(
    query As XPQuery(Of TEntity)
) As T

Parameters

Type Name Description
XPQuery<TEntity> query

An object of the XPQuery class that specifies a query.

Returns

Type Description
TT

A reference to this instance after the operation is completed.

Type Parameters

Name Description
TEntity

The type of the data in a dataset.

Remarks

The Card View control supports data binding in server mode, which is designed to work with large datasets. This technique significantly improves the control's speed and responsiveness.

The BindToXPO method is used to establish server-mode data binding using the DevExpress eXpress Persistent Objects for .NET (XPO) ORM. The following code demonstrates the described functionality in detail.

@model XPQuery<XPEmail>

@(Html.DevExpress()
    .BootstrapCardView<XPEmail>("cardViewWithXPO")
    .KeyFieldName(k => k.ID)
    .Columns(columns => {
        columns.Add(c => c.From);
        columns.Add(c => c.Subject);
    })
    .Routes(routes => routes
        .MapRoute(r => r
            .Action("BindingToXPOPartial")
            .Controller("CardView")))
    .BindToXPO(Model))

See also the Binding to Large Database using XPO online demo and the Getting Started with .NET Core article.

See Also