BHulk is a simple library to update a huge amount of records. Under the hood, use EF.Core ExecuteSqlCommandAsync, and dynamically build a query like this:
UPDATE Orders SET OrderCode = {0} WHERE Id IN ({1}, {2}, ....., {N})
Performs the update for the given list of primary key values in 1000-line steps at a time
var update = BHulk<Order>
.UseContext(() => ContextFactory())
.Set(o => o.OrderCode, "test")
.Set(o => o.Status, OrderStatus.Executed)
.Set(o => o.ModifiedDate, DateTime.UtcNow)
.For(Enumerable.Range(1,10000).ToArray())
.InStepOf(1000);
var affectedRows = await update.ExecuteAsync();
Uses a predicate for searching the primary keys and then perform the update in 1000-line steps at a time
var update = BHulk<Order>
.UseContext(() => ContextFactory())
.Set(o => o.Status, OrderStatus.Executed)
.Set(o => o.ModifiedDate, DateTime.UtcNow)
.For(o => o.Status == OrderStatus.Pending)
.InStepOf(1000);
var affectedRows = await update.ExecuteAsync();