Skip to content

Commit c52932b

Browse files
author
fabien.menager
committed
Disable PreserveInsertOrder for bulk insert to be more fair
1 parent 90b3a2b commit c52932b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/EntityFrameworkCore.ExecuteInsert.Benchmark/BulkInsertVsExecuteInsert.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ public async Task BulkInsertZEf()
7777
[Benchmark]
7878
public async Task BulkInsert()
7979
{
80-
await DbContextBulkExtensions.BulkInsertAsync(DbContext, data);
80+
await DbContext.BulkInsertAsync(data, options =>
81+
{
82+
options.IncludeGraph = false;
83+
options.PreserveInsertOrder = false;
84+
});
8185
}
8286
}

0 commit comments

Comments
 (0)