File tree 1 file changed +8
-0
lines changed
src/FirebirdSql.Data.FirebirdClient/FirebirdClient
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -558,6 +558,10 @@ public int GetCurrentBatchSize()
558
558
{
559
559
throw new InvalidOperationException ( "Batch must be prepared." ) ;
560
560
}
561
+ if ( ! HasParameters )
562
+ {
563
+ return 0 ;
564
+ }
561
565
return _batch . ComputeBatchSize ( _batchParameters . Count , this ) ;
562
566
}
563
567
public async Task < int > GetCurrentBatchSizeAsync ( CancellationToken cancellationToken = default )
@@ -566,6 +570,10 @@ public async Task<int> GetCurrentBatchSizeAsync(CancellationToken cancellationTo
566
570
{
567
571
throw new InvalidOperationException ( "Batch must be prepared." ) ;
568
572
}
573
+ if ( ! HasParameters )
574
+ {
575
+ return 0 ;
576
+ }
569
577
return await _batch . ComputeBatchSizeAsync ( _batchParameters . Count , this , cancellationToken ) . ConfigureAwait ( false ) ;
570
578
}
571
579
You can’t perform that action at this time.
0 commit comments