title: Trying to sync data from third party api
body: <p>This question has probably been asked correctly before, and I'll gladly accept an answer pointing me to the right spot. The problem is I don't know how to ask the question correctly to get anything returned in a search.</p>
  
  <p>I'm trying to pull data from a 3rd party api (ADP) and store data in my database using asp.net core.</p>
  
  <p>I am wanting to take the users returned from the API and store them in my database, where I have an ADP ancillary table seeded with the majority of the data from the api. </p>
  
  <p>I would then like to update or add any missing or altered records in my database <strong>FROM</strong> the API. </p>
  
  <p>I'm thinking that about using an ajax call to the api to retrieve the records, then either storing the data to another table and using sql to look for records that are changed between the two tables and making any necessary changes(this would be manually activated via a button), or some kind of scheduled background task to perform this through methods in my c# code instead of ajax. </p>
  
  <p>The question I have is: </p>
  
  <ol>
  <li>Is it a better fit to do this as a stored procedure in sql or rather have a method in my web app perform the data transformation.</li>
  <li>I'm looking for any examples of iterating through the returned data and updating/creating records in my database. </li>
  <li>I've only seen vague not quite what I'm looking for examples and nothing definitive on the best way to accomplish this. If I can find any reference material or examples, I'll gladly research but I don't even know where to start, or the correct terms to search for. I've looked into model binding, ajax calls, json serialization &amp; deserialization. I'm probably overthinking this. </li>
  </ol>
  
  <p>Any suggestions or tech I should look at would be appreciated. Thanks for you time in advance.</p>
  
  <p>My app is written in asp.net core 2.2 using EF Core</p>
  
  <p><strong>* EDIT *</strong> </p>
  
  <p>For anyone looking - <a href="https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/console-webapiclient" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/console-webapiclient</a> </p>
  
  <p>This with John Wu's Answer helped me achieve what I was looking for. </p>