This example loads appointments that fall into the specified date interval. The solution consists of three parts:
- Shared. This shared project contains the data and the view used by other projects. The view maps events to view model’s handlers. The events are mapped to the view model's handlers.
- CommonDbContext. This project implements a
SchedulingViewModel
that uses a singleDbContext
for the application. The DbContext is initialized once the view model is initialized. - DbContextPerRequest. This project implements a
SchedulingViewModel
that creates a newDbContext
per each request. The DbContext is initialized each time the DataSource.FetchAppointments event is fired.
Additionally, the view integrates the scheduler with the Date Navigator and Resource Navigator. The view displays the result of the fetch events in the Event Log text box.
Shared project:
CommonDbContext project:
DbContextPerRequest project: