diff --git a/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs b/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs index 439fff3f856..495e48135c4 100644 --- a/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs +++ b/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs @@ -960,7 +960,10 @@ public bool MoveNext() return false; } - _responseMessage = _query.ReadNextAsync().GetAwaiter().GetResult(); + _responseMessage = _cosmosClientWrapper._executionStrategy.Execute( + (_query, _cosmosClientWrapper), + static (_, state) => state._query.ReadNextAsync().GetAwaiter().GetResult(), + null); _cosmosClientWrapper._commandLogger.ExecutedReadNext( _responseMessage.Diagnostics.GetClientElapsedTime(), @@ -1061,7 +1064,11 @@ public async ValueTask MoveNextAsync() return false; } - _responseMessage = await _query.ReadNextAsync(cancellationToken).ConfigureAwait(false); + _responseMessage = await _cosmosClientWrapper._executionStrategy.ExecuteAsync( + (_query, _cosmosClientWrapper), + static (_, state, cancellationToken) => state._query.ReadNextAsync(cancellationToken), + null, + cancellationToken).ConfigureAwait(false); _cosmosClientWrapper._commandLogger.ExecutedReadNext( _responseMessage.Diagnostics.GetClientElapsedTime(),