From 3a0841e5c508694bbc572da766a3b79332849ea7 Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Mon, 20 Jul 2020 15:36:00 -0700 Subject: [PATCH] Set max batch size for Sql Server Fixes #9270 --- .../Update/Internal/SqlServerModificationCommandBatch.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EFCore.SqlServer/Update/Internal/SqlServerModificationCommandBatch.cs b/src/EFCore.SqlServer/Update/Internal/SqlServerModificationCommandBatch.cs index 3d5bd7ed440..a8425519522 100644 --- a/src/EFCore.SqlServer/Update/Internal/SqlServerModificationCommandBatch.cs +++ b/src/EFCore.SqlServer/Update/Internal/SqlServerModificationCommandBatch.cs @@ -45,7 +45,7 @@ public SqlServerModificationCommandBatch( throw new ArgumentOutOfRangeException(nameof(maxBatchSize), RelationalStrings.InvalidMaxBatchSize); } - _maxBatchSize = Math.Min(maxBatchSize ?? int.MaxValue, MaxRowCount); + _maxBatchSize = Math.Min(maxBatchSize ?? 42, MaxRowCount); } ///