For the complete tutorial directory, see :《CustomData service providers-Introduction"
Data ServicesA cool feature isProviderModel.
Any data source can be supported by some interfaces.OdataData Service,SharePoint 1, 2010You have implemented these interfaces to make public your data, so you can also make public yourFacebook, twriter ......
Once you implement these interfaces, you can use the supportOdataTo query your data. These clients includeWorkbook,LINQAnd so on.
CurrentData ServicesBuilt-in provides some providersProgram, IncludingEntity FrameworkAnd the reflection provider that uses reflection to access the object.
In this series of tutorials, I will introduce how to customize data providers step by step.
DSP Interface
DSPInclude5Important interfaces:
LIdataservicemetadataprovider
This interface is implemented to expose available resource types.(Resourcetype), Attributes, keywords, nested attributes, and resource set(Resourcesets);
LIdataservicequeryprovider
Use this interface to complete all realGetRequest;
LIdataserviceupdateprovider
If your data source is readable and writable, you also need to implement this interface to supportPut,PostAndDelete.
LIdataservicepagingprovider
By implementing this interface, you can get more fine-grained"Server Page"Control.
LIdataservicestreamprovider
If you need to support stream output, such as multimedia, you also need to implement this interface to support stream output.
Therefore, to implement the simplest read-only data service, you must implementIdataservicemetadataproviderAndIdataservicequeryproviderInterface.