Data Access has been discontinued. Please refer to this page for more information.

How to: Update the Generated Service

This article is relevant to entity models that utilize the deprecated Visual Studio integration of Telerik Data Access. The current documentation of the Data Access framework is available here.

This topic describes how to update your WCF Data Service when the domain model changes. For example, you add new tables and columns in the database and update your domain model. In this case, you will need to update your WCF Data Service to expose the new entities and properties.

Updating a WCF Data Service

Suppose, you have added new tables and columns in your database and you have reflected the changes in your domain model by using the Update from Database Wizard. The next step is to update your WCF Data Service to expose the updated model. The image below shows a sample Web solution with Telerik Data Access Domain Model and WCF Data Service v2 generated using the Service Wizard.

To regenerate your WCF Data Service:

  1. Build your solution and run the Service Wizard.
  2. On the Select Source and Output use the same configuration as the previous generation of the service.
  3. On the Select Service Type dialog, select the same service type, e.g. WCF Data Service v2 or WCF Data Service v1.
  4. On the Service Configuration dialog, check all entities that should be exposed by the service, not only the newly added. Set the same service name as the name of the original service. This is the name of the generated service class. E.g. you can see the name of the service class in the SCRModelService.svc.cs file.
  5. When you click next, you should be presented with the following dialog asking whether you want to replace the existing service files. Click Generate and Replace for all conflicts.

  6. On the final page, click Finish to re-generate the service.

Updating the Service Reference on the Client

Regenerating your WCF Data Service is the first step. The second step is to update the Service Reference in the client project. You could do that directly in Solution Explorer. Right click the generated service reference and select Update Service Reference.