Skip to Content
-1

how to know how many times odata service has been called for all the rows.

Hello ,

I have a use case like example I have a table called Page , for that i have made odata service and in that table count field is their.

so when ever the services is called using the pageId in the Url the count field should get Increment so that we will get to know how many times the user has viewed the page.

how to know how many times odata service has been called for all the rows.

Thanks,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 07 at 05:35 PM
    -1

    In your Page Table have at least two columns - Page Id and Counter. whenever a get call is triggered, after successful retrieval increment the counter by 1 and persist the same. On next call , the counter will hold the number of times the Page has been retrieved earlier and use the same for current processing. Also after successful retrieval increment the counter again by 1 and persist. Repeat this process for all calls.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 31, 2017 at 02:03 PM

    Hi,

    In the place where you issue your OData, you should have a mechanism that controls that - using some persist data structure, e.g. DB table (that could have other identifiers apart from the counter - like caller, current id, unique number etc.) for the case it is consumed from multiple resources.

    In addition, there are many analytic tools to track user usage (like Google Analytics).

    Add comment
    10|10000 characters needed characters exceeded