locked
Having Trouble Understanding How DSPUpdateProvider is referenced in TypedData Example RRS feed

  • Question

  • I'm trying to understand how the DSPUpdateProvider is being referenced in the "typed" example in the OData sdk examples. That is, I see in DSPDataService.cs the Update Provicer in instantiated from within GetService(..), but I can't figure out how GetService gets called.

    Specifically, I'm looking at the service code itself which reference the DSPContext, but can't figure out how that DSPContext makes GetService get called.

    Thanks,


    Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider
    Sunday, April 11, 2010 2:42 PM

Answers

  • "GetService" is part of WCF Data service's IDSP contract, upon a request the server will automatically call GetService with a bunch of different requests. For example, if an update operation is requested, then we'll call GetService with the update service provider interface. If null is returned, then we'll fall back to the default implementation.

    I've replied to your other post with a link to a series of blogs written by Alex James. They are very good read in helping you understand our provider model. Although you may not need the full thing to reach your goal, having a good understanding of our server infrastructure is always a plus :)

    Regards,

    PQ


    Peter Q. http://blogs.msdn.com/peter_qian
    • Marked as answer by Peter Kellner Wednesday, April 14, 2010 5:04 AM
    Sunday, April 11, 2010 6:29 PM
    Answerer