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 ASP.NET Web API Service when the domain model changes. For example, you add new tables in the database and update your domain model. In this case, you will need to update your ASP.NET Web API Service to generate the new controllers.

Updating a ASP.NET Web API Service

Suppose, you have added new tables 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 ASP.NET Web API Service to expose the new controllers. The image below shows a sample Web solution with Telerik Data Access Domain Model and ASP.NET Web API Service generated using the Service Wizard.

To regenerate your ASP.NET Web API 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. ASP.NET Web API Service.
  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 EntitiesModelService.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.

  7. Build your solution.