In the previous chapter, we described how to access the resources provided by the OData service through the OData protocol. The following describes how to create a OData service. In this article, the main description in the. NET environment, how to use the WCF Data service to create the OData service. Of course, for JAVA or other platforms, you can also create OData services. Even the database can provide OData services.
WCF Data Service is required for ORM support, of course, mainstream ORM has supported WCF data service, including (but not limited to) the Entity framework, Linq to SQL, alinq these mainstream ORM framework 。
First, create Model
The first thing to do with the WCF Data service is to create the model, about how to create the model, not to talk about it here, if it's not clear, please read the relevant tutorials based on the ORM you are using.
Second, create WCF Data Service
Right-click on the item, select Add Item, then select WCF Data Service, and if this is not found, install the WCF Data Service template.