locked
Server Side Paging in WCF Data Service RRS feed

  • Question

  • User-1141190189 posted

    I have created WCF service to retrieve data from SQL database. it returns huge amount of records; some times 200000 record.

    so i need to create paging each page with size 1000 record. any help please ?

    note : i retrieve data from SQL view not stored procedure 

    Thank You 

    Monday, December 17, 2018 11:25 AM

All replies

  • User475983607 posted

    so i need to create paging each page with size 1000 record. any help please ?

    Paging and filtering is a very common programming feature with ample code samples a Google search away.   A common approach is adding the number of records to return and the requested page to the service method arguments.  Then using these inputs to filter the SQL result set.

     Can clarify where you are in the current paging design?  Can you post your code?

    Monday, December 17, 2018 12:56 PM
  • User1724605321 posted

    Hi Sanfoor ,

    You can refer to below article for efficiently server side paging :

    Efficiently Paging Through Large Amounts of Data (C#)

    You should use Stored Procedure to write sql scripts  and accept the parameters to filter your records in sql server .

    Best Regards,

    Nan Yu

    Tuesday, December 18, 2018 2:54 AM