private async Task RollbackImpl(string savePointName, AsyncWrappingCommonArgs async)
        {
            EnsureSavePointName(savePointName);
            EnsureCompleted();
            try
            {
                var command = new FbCommand($"ROLLBACK WORK TO SAVEPOINT {savePointName}", _connection, this);
#if NET48 || NETSTANDARD2_0
                using (command)
#else
                await using (command.ConfigureAwait(false))
#endif
                {
                    await async.AsyncSyncCall(command.ExecuteNonQueryAsync, command.ExecuteNonQuery).ConfigureAwait(false);
                }
            }
            catch (IscException ex)
            {
                throw FbException.Create(ex);
            }
        }
Esempio n. 2
0
        public override async Task RollbackAsync(string savePointName, CancellationToken cancellationToken = default)
#endif
        {
            EnsureSavePointName(savePointName);
            EnsureCompleted();
            try
            {
                var command = new FbCommand($"ROLLBACK WORK TO SAVEPOINT {savePointName}", _connection, this);
#if NET48 || NETSTANDARD2_0
                using (command)
#else
                await using (command.ConfigureAwait(false))
#endif
                {
                    await command.ExecuteNonQueryAsync(cancellationToken).ConfigureAwait(false);
                }
            }
            catch (IscException ex)
            {
                throw FbException.Create(ex);
            }
        }