@@ -415,7 +415,7 @@ public async Task GrantRead (string to, CancellationToken cancellationToken = de
415415 GuardAgainstDisposed ( ) ;
416416 using ( var connection = _createConnection ( ) )
417417 {
418- await connection . OpenAsync ( cancellationToken ) . NotOnCapturedContext ( ) ;
418+ await connection . OpenAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
419419 await GrantReadInternal ( to , connection , cancellationToken ) ;
420420 }
421421 }
@@ -425,7 +425,7 @@ public async Task GrantAppend(string to, CancellationToken cancellationToken = d
425425 GuardAgainstDisposed ( ) ;
426426 using ( var connection = _createConnection ( ) )
427427 {
428- await connection . OpenAsync ( cancellationToken ) . NotOnCapturedContext ( ) ;
428+ await connection . OpenAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
429429 await GrantAppendInternal ( to , connection , cancellationToken ) ;
430430 await GrantReadInternal ( to , connection , cancellationToken ) ;
431431 }
@@ -441,7 +441,7 @@ private async Task GrantReadInternal(string to, SqlConnection connection, Cancel
441441 command . Parameters . Add ( new SqlParameter ( "@membername" , to ) ) ;
442442 await command
443443 . ExecuteNonQueryAsync ( cancellationToken )
444- . NotOnCapturedContext ( ) ;
444+ . ConfigureAwait ( false ) ;
445445 }
446446 }
447447 private async Task GrantAppendInternal ( string to , SqlConnection connection , CancellationToken cancellationToken )
@@ -452,7 +452,7 @@ private async Task GrantAppendInternal(string to, SqlConnection connection, Canc
452452 command . CommandTimeout = _commandTimeout ;
453453 await command
454454 . ExecuteNonQueryAsync ( cancellationToken )
455- . NotOnCapturedContext ( ) ;
455+ . ConfigureAwait ( false ) ;
456456 }
457457 using ( var command = new SqlCommand ( "sp_addrolemember" , connection ) )
458458 {
@@ -462,7 +462,7 @@ await command
462462 command . Parameters . Add ( new SqlParameter ( "@membername" , to ) ) ;
463463 await command
464464 . ExecuteNonQueryAsync ( cancellationToken )
465- . NotOnCapturedContext ( ) ;
465+ . ConfigureAwait ( false ) ;
466466 }
467467 }
468468 }
0 commit comments