Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/SqlStreamStore.MsSql/MsSqlStreamStoreV3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public async Task GrantRead (string to, CancellationToken cancellationToken = de
GuardAgainstDisposed();
using (var connection = _createConnection())
{
await connection.OpenAsync(cancellationToken).NotOnCapturedContext();
await connection.OpenAsync(cancellationToken).ConfigureAwait(false);
await GrantReadInternal(to, connection, cancellationToken);
}
}
Expand All @@ -425,7 +425,7 @@ public async Task GrantAppend(string to, CancellationToken cancellationToken = d
GuardAgainstDisposed();
using (var connection = _createConnection())
{
await connection.OpenAsync(cancellationToken).NotOnCapturedContext();
await connection.OpenAsync(cancellationToken).ConfigureAwait(false);
await GrantAppendInternal(to, connection, cancellationToken);
await GrantReadInternal(to, connection, cancellationToken);
}
Expand All @@ -441,7 +441,7 @@ private async Task GrantReadInternal(string to, SqlConnection connection, Cancel
command.Parameters.Add(new SqlParameter("@membername", to));
await command
.ExecuteNonQueryAsync(cancellationToken)
.NotOnCapturedContext();
.ConfigureAwait(false);
}
}
private async Task GrantAppendInternal(string to, SqlConnection connection, CancellationToken cancellationToken)
Expand All @@ -452,7 +452,7 @@ private async Task GrantAppendInternal(string to, SqlConnection connection, Canc
command.CommandTimeout = _commandTimeout;
await command
.ExecuteNonQueryAsync(cancellationToken)
.NotOnCapturedContext();
.ConfigureAwait(false);
}
using (var command = new SqlCommand("sp_addrolemember", connection))
{
Expand All @@ -462,7 +462,7 @@ await command
command.Parameters.Add(new SqlParameter("@membername", to));
await command
.ExecuteNonQueryAsync(cancellationToken)
.NotOnCapturedContext();
.ConfigureAwait(false);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public async Task CreateUser(string user, CancellationToken cancellationToken =
{
await connection
.OpenAsync(cancellationToken)
.NotOnCapturedContext();
.ConfigureAwait(false);
await command
.ExecuteScalarAsync(cancellationToken)
.NotOnCapturedContext();
.ConfigureAwait(false);
}
}
}
Expand Down Expand Up @@ -107,4 +107,4 @@ public async Task Prepare()
await MsSqlStreamStoreV3.CreateSchemaIfNotExists();
}
}
}
}