none
LS2013 - Consuming an OData datasource in one LS app from another LS app does not expose non-default query methods?

    Question

  • 1/ Create simple RIA domain service in a class library with a default query method as well as another non-default query method

    2/ Create a LS HTML project, added a reference to the above assembly and add the RIA domain service as a datasource

    3/ All is good and you see both the default and non-default query methods in the newly attached datasource

    4/ Now create a second LS HTML project and add an OData datasource pointing at the OData service that is exposed by the first LS project above (selecting all entities and making it writeable)

    5/ You will now notice that in the second LS project the datasource only exposes the default query method from the OData service exposed by the first project. Why does it not also expose the non-default query method?

    Question: Am I missing something or is this by design and if so why and is there a workaround?


    Regards, Xander

    • Edited by novascape Thursday, July 18, 2013 11:47 PM typo
    Thursday, July 18, 2013 11:44 PM

Answers

  • Xander - this is actually NOT supported, unfortunately ("by design").

    It's something we are aware of and have discussed in the past.  But when attaching to OData services, we don't pull in functions or queries - we only pull in entities.

    I hope that helps.

    Matt Sampson


    R. Matt Sampson

    • Marked as answer by novascape Tuesday, July 23, 2013 9:56 PM
    Tuesday, July 23, 2013 1:41 PM

All replies

  • Xander - this is actually NOT supported, unfortunately ("by design").

    It's something we are aware of and have discussed in the past.  But when attaching to OData services, we don't pull in functions or queries - we only pull in entities.

    I hope that helps.

    Matt Sampson


    R. Matt Sampson

    • Marked as answer by novascape Tuesday, July 23, 2013 9:56 PM
    Tuesday, July 23, 2013 1:41 PM
  • Thanks Matt, that is very helpful to know that it is by design. I think it would be a useful enhancement for a future version if there are no technical obstacles. Thanks again.

    Regards, Xander

    Tuesday, July 23, 2013 10:00 PM