Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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