XPBaseCollection.LoadAsync(CancellationToken) Method
In This Article
Asynchronously loads persistent objects of a specific type from the data store into the collection.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.2.dll
NuGet Package: DevExpress.Xpo
#Declaration
public virtual Task LoadAsync(
CancellationToken cancellationToken
)
#Parameters
Name | Type | Description |
---|---|---|
cancellation |
Cancellation |
A Cancellation |
#Returns
Type | Description |
---|---|
Task | A Task that starts the collection load. |
#Remarks
Note
If the XPBase
The following example demonstrates how to asynchronously work with persistent objects.
using DevExpress.Xpo;
// ...
XPCollection<Customer> customers = new XPCollection<Customer>(session);
await customers.LoadAsync();
gridControl.DataSource = customers;
See Also