Simple provider that only supports retrieval by entity keys RRS feed

  • Question

  • I hope I can express this question clearly as my Google-fu has failed me and I can't seem to find anything regarding this scenario.

    We have a telecom switching platform that allows me to get/put subscriber data using a convoluted SOAP API. I would like to wrap this in a thin OData layer that would be consistent with the other data sources that I've exposed in this manner. But since the underlying API is SOAP and not SQL, I can't just hand a bunch of IQueryables to WCF Data Services.

    I was wondering if there is any sample or reference implementation of a provider that *only* supports retrieval of entities based on their keys.

    For example, the following would be supported:

    • http://example.org/Subscribers('5555555555')
    • http://example.org/Subscribers?$filter=ID eq '5555555555'

    But the following would not be:
    • http://example.org/Subscribers
    • http://example.org/Subscribers?$filter=Name eq 'Foo'
    Implementing IQueryable is a *huge* undertaking for such a simple provider that should only ever be able to get at most one entity by identity. But as far as I can tell, implementing a full-fledged IQueryable is the only way to plug into the WCF Data Services provider model.

    Any ideas?


    Josh Einstein www.josheinstein.com
    Friday, July 9, 2010 5:03 PM