R – find information on creating a WCF Data Services Custom Data Service Provider

wcf-data-services

Our team is evaluating using WCF Data Services (formerly ADO.NET Data Services), and have determined we'll have to create a Custom Data Service Provider. Where can we find a sample implementation of the two required interfaces: IDataServiceMetadataProvider and IDataServiceQueryProvider?

EDIT: Note that a "WCF Custom Data Service Provider" is not the same as an "ADO.NET Custom Data Provider."

EDIT: We have begun reverse-engineering using Reflector, but I would still appreciate it if somebody had a sample they would be willing to post!

Best Answer

I've just implemented my first DataService with custom provider two weeks ago, and was on the verge of giving up (even after reading AlexJ's blog post on custom providers.).

Then I found that the custom provider toolkit makes this task quite easy. Have a look at the solution and the way the demo web service therein is implemented. Then alter that demo project to fit your needs. It's much easier that coding all this from scratch, and the toolkit is built with reusability in mind anyway.