diff --git a/Directory.Packages.props b/Directory.Packages.props
index f78076e1f..618733d6f 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -2,7 +2,7 @@
6.0.0-preview.7.21378.4
6.0.0-preview.7.21377.19
- 6.0.0-preview6
+ 6.0.0-preview7
@@ -26,4 +26,4 @@
-
\ No newline at end of file
+
diff --git a/src/EFCore.PG/Update/Internal/NpgsqlModificationCommandBatch.cs b/src/EFCore.PG/Update/Internal/NpgsqlModificationCommandBatch.cs
index 9fe7eb754..79d294e6f 100644
--- a/src/EFCore.PG/Update/Internal/NpgsqlModificationCommandBatch.cs
+++ b/src/EFCore.PG/Update/Internal/NpgsqlModificationCommandBatch.cs
@@ -71,7 +71,11 @@ protected override bool IsCommandTextValid()
protected override void Consume(RelationalDataReader reader)
{
var npgsqlReader = (NpgsqlDataReader)reader.DbDataReader;
+
+#pragma warning disable 618
Debug.Assert(npgsqlReader.Statements.Count == ModificationCommands.Count, $"Reader has {npgsqlReader.Statements.Count} statements, expected {ModificationCommands.Count}");
+#pragma warning restore 618
+
var commandIndex = 0;
try
@@ -89,6 +93,7 @@ protected override void Consume(RelationalDataReader reader)
// make sure they executed
for (; commandIndex < nextPropagating; commandIndex++)
{
+#pragma warning disable 618
if (npgsqlReader.Statements[commandIndex].Rows == 0)
{
throw new DbUpdateConcurrencyException(
@@ -96,6 +101,7 @@ protected override void Consume(RelationalDataReader reader)
ModificationCommands[commandIndex].Entries
);
}
+#pragma warning restore 618
}
if (nextPropagating == ModificationCommands.Count)
@@ -139,7 +145,11 @@ protected override async Task ConsumeAsync(
CancellationToken cancellationToken = default)
{
var npgsqlReader = (NpgsqlDataReader)reader.DbDataReader;
+
+#pragma warning disable 618
Debug.Assert(npgsqlReader.Statements.Count == ModificationCommands.Count, $"Reader has {npgsqlReader.Statements.Count} statements, expected {ModificationCommands.Count}");
+#pragma warning restore 618
+
var commandIndex = 0;
try
@@ -158,6 +168,7 @@ protected override async Task ConsumeAsync(
// make sure they executed
for (; commandIndex < nextPropagating; commandIndex++)
{
+#pragma warning disable 618
if (npgsqlReader.Statements[commandIndex].Rows == 0)
{
throw new DbUpdateConcurrencyException(
@@ -165,6 +176,7 @@ protected override async Task ConsumeAsync(
ModificationCommands[commandIndex].Entries
);
}
+#pragma warning restore 618
}
if (nextPropagating == ModificationCommands.Count)