dimanche 25 décembre 2022

which design pattern is appropriate for reading data from api and updating to data bases?

net core application. I have list of ids which I need to pass to multiple api as input parameters which then returns values which i need to update in multiple tables. In short

lets consider I have list with ids 1,2,3 List list = new List(){1,2,3}

foreach(int data in list)
{
 here pass 1 to multiple apis
 1. api1(with input parameter 1) which returns data
    update to table
 2. api2(with input parameter 1) which returns data
    update to table
}

Here my list may contains 5000 ids in total and which may need to call 3 apis to fetch data and update in table. I am looking for best design pattern which suits to this requirement. I had gone through CQRS pattern not sure that will work here appropriately. can anyone suggest me best design pattern? Any help would be appreciated. Thank you

Aucun commentaire:

Enregistrer un commentaire