prasanna p

prasanna p

  • 1.2k
  • 465
  • 96.7k

how to execute webapi multiple times simultaneously

Apr 21 2022 2:31 PM

Hi Friends,

I am looping and inserting multiple web apis data into the database.Large amounts of data coming from the web api's.I am calling webapi's in the page load.I placed condition to webapi that if apidate greater than maxdate from sql datatable and sql command time Timeout 180.

But at a time complete data is not inserting into the dataase, I am selecting page multiple times to insert all web api's data.

I used async task method and in the for loop(loop count 3) I am adding task.add(web api method).

I am calling Task.Whenall but complete data from all api's is not inserting into the datatable at a time.

how to do this web Api's execution automatically without selecting page multiple times?

 


Answers (1)