I have a list which consists of around 1,000,000 records. And, I am using EF to insert it into the database. Since it takes too long I need to split this List into blocks of 100 records and save.
How can I do this?
await dbCont.People.AddAsync(peoples);
await dbCont.Savechanges();
The people's List here contains 1,000,000 records. And instead of saving all at once (slows the insert), I need to insert around 100 records at a time. How can I do this?