none
Where is SetEntitySetPageSize method?

Answers

  • Hi James,

     The SetEntitySetPageSize APIs are decalred on the DataServiceConfiguration type and not the IDataServiceConfiguration interface.
     In the InitializeService method , change the type of the "config" parameter to be DataServiceConfiguration , instead of IDataServiceConfiguration .
     You should then be able to access the paging  APIs.

     


    Phani Raj Astoria http://blogs.msdn.com/PhaniRaj
    Thursday, April 1, 2010 8:37 PM
    Moderator

All replies

  • Hi James,

     The SetEntitySetPageSize APIs are decalred on the DataServiceConfiguration type and not the IDataServiceConfiguration interface.
     In the InitializeService method , change the type of the "config" parameter to be DataServiceConfiguration , instead of IDataServiceConfiguration .
     You should then be able to access the paging  APIs.

     


    Phani Raj Astoria http://blogs.msdn.com/PhaniRaj
    Thursday, April 1, 2010 8:37 PM
    Moderator
  • Thanks Phani. Changing the config parameter type did the trick.

    But then I got a runtime error: "Server paging cannot be used when the MaxProtocolVersion of the data service is set to DataServiceProtocolVersion.V1"

    So I also had to add another line of code:

    config.DataServiceBehavior.MaxProtocolVersion = 
        System.Data.Services.Common.DataServiceProtocolVersion.V2;

    which in turn required adding a reference to the System.Data.Services.Client assembly.

    Bottom line - it's working now. Thanks for your quick response!

    - James

     

    Thursday, April 1, 2010 8:50 PM