I Am using .NET Core WebApi and EF Core.
I have the following scenario:
- I have an endpoint which accepts a CSV file
- This CSV File contains more than 15.000 lines
- I need to parse this CSV file and store each line in my database
- Before I store each line, I need to check if the data inside exists already (4-5 values/line need to be checked if they exists as independent entities)
My problems:
- The checking if the data exist, takes a long time (15.000 times 4-5 checks...)
So I wanted to maybe create some Tasks to store batchwhise in the DB (but in .NET Core WebApi) you cannot run Background tasks, right?
How would you guys achieve this ?