Skip to content

Commit 6e06aef

Browse files
authored
Correct error message on DbDataSource batch prepare (#112609)
1 parent 0004083 commit 6e06aef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libraries/System.Data.Common/src/System/Data/Common/DbDataSource.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,10 +561,10 @@ public override async ValueTask DisposeAsync()
561561
// provide their own connection-less implementation anyway (i.e. interacting with the originating
562562
// DbDataSource), so they'd have to override this in any case.
563563
public override void Prepare()
564-
=> throw ExceptionBuilder.NotSupportedOnDataSourceCommand();
564+
=> throw ExceptionBuilder.NotSupportedOnDataSourceBatch();
565565

566566
public override Task PrepareAsync(CancellationToken cancellationToken = default)
567-
=> Task.FromException(ExceptionBuilder.NotSupportedOnDataSourceCommand());
567+
=> Task.FromException(ExceptionBuilder.NotSupportedOnDataSourceBatch());
568568

569569
// The below are incompatible with batches executed directly against DbDataSource, since no DbConnection
570570
// is involved at the user API level and the DbBatchWrapper owns the DbConnection.

0 commit comments

Comments
 (0)