How do I implement IDataServiceMetadataProvider and tell my Data Service to use that custom provider?-Collection of common programming errors
We are looking at revising some of the documentation for these interfaces for RTM. In the meantime , to get the Data Services runtime to pick up your IDataServiceMetadataProvider implementation , you will need to implement the IServiceProvider interface on your Data Service class .
IServiceProvider on MSDN
Sample :
public class northwindService:DataService , IServiceProvider
{
public object GetService(Type serviceType)
{
if (serviceType == typeof(IDataServiceMetadataProvider )) {
//return instance of type which implements IDataServiceMetadataProvider
}
return null;
}
}