C
C#17mo ago
Shiv

✅ Inserting Master Detail table rows parallelly

Team, Need your inputs please, Say I want to insert 10 rows of data to master Db table and insert 100 rows each for detail table (with id of master table rows) ...one way is insert master table rows first and loop it to insert detail table rows. Can we somehow run it parallelly ..First insert the master table row and start inserting detail table rows in a seperate thread before executing second? Any suggestions , Can I use ihostedservice to run a background job for the above usecase?
2 Replies
Mayor McCheese
Mayor McCheese17mo ago
IMO a background service is going to be something that does work you don't need to watch, so; for example, you might be writing data to a channel and have a background service read from the channel and take actions; it doesn't matter when it happens, just that it happens in a reasonable time.
Accord
Accord17mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server