Skip to main content
All docs
V24.2

FetchDataEventArgs.GetFetchExpression<T>() Method

Generates an expression that you can use to obtain appointments from the data source.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v24.2.dll

NuGet Package: DevExpress.Wpf.Scheduling

Declaration

public Expression<Func<T, bool>> GetFetchExpression<T>()

Type Parameters

Name
T

Returns

Type Description
Expression<Func<T, Boolean>>

An expression that you can use to obtain appointments from the data source.

Remarks

The code snippet below illustrates how to use the GetFetchExpression method to implement the FetchAppointments event.

public void FetchAppointments(FetchDataEventArgs args) {
  using(var dbContext = new SchedulingContext()) {
      args.AsyncResult = dbContext.AppointmentEntities
      .Where(args.GetFetchExpression<AppointmentEntity>())
      .ToArrayAsync();
  }
}
See Also