0

I've a requirement for which I need to have WebAPI get method, which should latest records of a table, and this api get method will be continuosly called from another webAPI method continously to insert the data into the tables.

We are bound to have two webAPIs as we cannot directly interact with the database due to security issues. Could someone please suggest the best approach for implementing this.

One way I know is to call the get WEBAPI method, from the APP_start of the calling WebAPI within a timer. Please suggest the approach. Thanks for the help.

  • Web API's are message based. There's no such as 'continuously'. There are other communication methods besides Web API's that do support continuous (such as a a windows service or message queue). Its strange that direct interaction is not available but web API's are? You might find that repeated web API calls are as good as 'continuous' anyway – Nick.Mc Jul 09 '18 at 03:54
  • Hi @Nick.McDermaid Approach we have taken is to schedule a console app from Windows Scheduler to run in regular intervals. This calls the first api using HttpClient, and the from api action task, we are calling another api as per requirement using HttpClient.PostAsync(). – Surendra Rayapati Oct 26 '18 at 04:40

1 Answers1

1

Approach we have taken is to schedule a console app from Windows Scheduler to run in regular intervals. This calls the first api using HttpClient, and the from api action task, we are calling another api as per requirement using HttpClient.PostAsync().