Service Generation Outcome
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.
The Service Wizard allows you to generate RESTful Collection Service based on Telerik Data Access. This topic discusses the changes that the wizard will make to your project.
References
The wizard adds references to:
- System.ServiceModel.dll
- Systme.Runtime.Serialization.dll
- System.ServiceModel.Web.dll
- Telerik.OpenAccess.dll
- Telerik.OpenAccess.35.Extensions.dll
- <Your Telerik Data Access Model Project>
Generated Files
When RESTful Collection Service is generated, the wizard will automatically create several additional files and will add them to the Output project.
- Assemblers.cs - contains implementation of the Assembler pattern that translates DTO types into Entity types and vice versa. In the case of DTO to Entity types the generated assemblers CAN (not enabled by default) set navigation properties for references and collections.
- <XXX>CollectionService.svc - markup files for the generated services (e.g. CarsCollectionService.svc). This is the hosting svc file for the service for each feed.
-
<XXX>CollectionService.svc.cs - contains the implementation of the service contract for each feed. The implementation of the operations is delegated to the mini-services defined in Services.cs.
To see the <XXX>CollectionService.svc.vb files in VB projects, use the Show All Files command from the Solution Explorer toolbar.
Converter.cs - contains converters from one value format to another. In this particular case it is KeyUtility that is responsible for conversion of ObjectKey values to string values.
- DynamicLinq.cs - extension methods that enable definition of IQuerable<T> calls using string predicates instead of lambda expressions.
- I<XXX>CollectionService.cs - this is the service contract interface for each feed.
- ItemInfo.cs - ItemInfo type wraps any of the entity types as payload and transports it to the client.
- ItemInfoList.cs - wrapper type for lists/enumerations of entities.
- Repositories.cs - contains implementation of the Repository pattern that enables access to the data shaped by your decision in step 3 of the wizard. Provides CRUD operations interface to the database.
- Services.cs - contains separate services that operated on a single entity. These services are not exposed at service level.
- Transport.cs - contains DTO types definitions that are transported between the client and the server in order to encapsulate the data access layer entities from the outside world.