Is there way with EF Core Bulk extensions to only update first few 10000 rows? write message, update next batch, write message in loop until complete?
I know there is Batch Size, however if there is only 5 million to update, and I want only update a certain amount, write a message, in continual loop until complete, how can this be done?
Should I use Top or Take?
I want to write "Hello", every few batches.
while {
await _dbContext.Set<Product>()
.Where(x => x.Manufacturer == "ABC Company" &&
x.StartYear == 2019 &&
x.ProductType.ProductTypeDescription == "Electronics")
.BatchUpdateAsync(x => new Product(){
Manufacturer = "XYZ Company",
StartYear = 2020 });
Console.WriteLine("hello"):
https://github.com/borisdj/EFCore.BulkExtensions
Using EF Core 3.1.
Company does not want to use SignalR