Add two XPO data sources to your project by dragging them from the toolbox onto a form. Specify the IDs and XPObjectType.TypeName for these controls - the first will be the appointmentDataSource with the Task type assigned, the second will be the resourceDataSource with the Employee type assigned.

4. Provide the Correct Appointment Identifier

It is necessary to obtain a correct appointment identifier to track the newly created appointment. To accomplish this, a new XPORowInsertionProvider class is defined. It is aimed at retrieving the key identifier value of the last inserted appointment, and correct the corresponding value of the appointment in the storage. It handles the Session.ObjectSaved event of the Session object and the ASPxScheduler.AppointmentsInserted event of the ASPxScheduler. The code for this class is presented below:

After completing these steps, run the project and observe the result - a web site with the ASPxScheduler control bound to an XPO data source. Note that you can connect XPO to a database server as described in the Connecting XPO to a Database Server (ASP.NET) article. By default, your data persists in the .mdb file of MS Access format within the App_Data folder.