This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
API Controllers that dont use Microsoft.AspNetCor.Datasync TableController #849
Answered
by
adrianhall
ideas2appsaustralia
asked this question in
Q&A
-
If the API I am accessing does not use TableController class and has different endpoint URLs but the same HTTP filter which doesnt match with DatasyncClient PullItemsAsync expectation what can I do to find a solution?. The API has a [HttpPost] that I use to get all records but then it has a second HttpPost, [HttpPost("CreateLoad")] that I need to hit if I want to insert a new record. [HttpGet] on its own is not an allowed method |
Beta Was this translation helpful? Give feedback.
Answered by
adrianhall
Dec 22, 2023
Replies: 1 comment 7 replies
-
We do not support and generally you cannot use a server that does not implement TableController. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can delete the SQLite database, or you can use the ExecuteSqlAsync() method to delete all records in the __OperationsQueue table. Or you can use PurgeItemsAsync() as you did.
Something tells me that you have a piece of code that is creating a record. We don't do that on PullItemsAsync() nor do we do that on a GET. Add logging to the client to determine if you are doing a POST. If you are, then you can and should trace it back. Don't forget that a PullItemsAsync() automatically does a Push if the table has any pending records to push.